troubleshooting Question

Microsoft JScript runtime error: '$' is undefined - with jquery slider

Avatar of jordanking
jordankingFlag for Canada asked on
JavaScript.NET ProgrammingASP.NET
5 Comments1 Solution1639 ViewsLast Modified:
hello,

i am getting the following error "Microsoft JScript runtime error: '$' is undefined" when i moved a website from one computer to another.  no code changed.  The initial computer was running visual studio web developer 2008, the new computer has vs web developer 2010.  I can not seem to figure out what is different, the project still references the same .net 3.5 framework.  The code works fine when put on the live web server, but I need to be able to run it locally.

the error is thrown on the following line of code in the aspx page head: $(function(){  (shown below)
 
<script type="text/javascript" src="../js/jquery-1.2.6.min.js"></script> 
	<script type="text/javascript" src="../js/jquery-easing-1.3.pack.js"></script> 
	<script type="text/javascript" src="../js/jquery-easing-compatibility.1.2.pack.js"></script> 
	<script type="text/javascript" src="../js/coda-slider.1.1.1.pack.js"></script> 	
	<script type="text/javascript"> 
	
		var theInt = null;
		var $crosslink, $navthumb;
		var curclicked = 0;
		
		theInterval = function(cur){
			clearInterval(theInt);
			
			if( typeof cur != 'undefined' )
				curclicked = cur;
			
			$crosslink.removeClass("active-thumb");
			$navthumb.eq(curclicked).parent().addClass("active-thumb");
				$(".stripNav ul li a").eq(curclicked).trigger('click');
			
			theInt = setInterval(function(){
				$crosslink.removeClass("active-thumb");
				$navthumb.eq(curclicked).parent().addClass("active-thumb");
				$(".stripNav ul li a").eq(curclicked).trigger('click');
				curclicked++;
				if( 6 == curclicked )
					curclicked = 0;
				
			}, 3000);
		};
		
		$(function(){
			
			$("#main-photo-slider").codaSlider();
			
			$navthumb = $(".nav-thumb");
			$crosslink = $(".cross-link");
			
			$navthumb
			.click(function() {
				var $this = $(this);
				theInterval($this.attr('href').slice(1) - 1);
				return false;
			});
			
			theInterval();
		});
	</script>
 

the error seems to indicate that the function cannot be found in the referenced java script files, but these exact libraries are working fine on other systems, so it has to be something in my environment that is killing it, but i don't know where to look

thanks in advance
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros