Topic: Something I'm doing everytime ?????

Let it be known that I am a copy and paster javascript user. I am learning it more and more but still do not understand the concept of the code.

But I am doing something on all of my sites that breaks all of my Javascript in IE and Firefox PC. Mostly I use the jquery.jcarousellite.pack.js, and some ui.tabs but no matter what I do none of it ever works in those browsers. Everything works great in Safari, and Firefox MAC

I was wondering if somone could help me out and let me know why that would be. Here is some example code for you.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>River City Internet Campus v2.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> 
<link rel="stylesheet" type="text/css" href="form.css" /> 
<link rel="stylesheet" href="yshout/example/css/light.yshout.css" />

<script src="js/sifr.js" type="text/javascript"></script>
<script src="js/sifr-addons.js" type="text/javascript"></script>
<script src="yshout/js/jquery.js" type="text/javascript"></script>
<script src="yshout/js/yshout.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery-1.3.1.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.1.js"></script>
<script type="text/javascript" src="js/jquery.jcarousellite.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	
	
	$(function() {
	    $(".slides").jCarouselLite({ 
	        btnNext: ".next",
	        btnPrev: ".prev",
	        speed: 400,
	        visible: 1,
	    });
	});
});



</script>
		
				<div id="gallery">
			<div class="slides">
				<ul>
					<li><script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script>
 
<div id="player">This text will be replaced</div>
 
<script type="text/javascript">
var so = new SWFObject('http://www.rivercitywc.com/webcampus/player.swf','mpl','500','280','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=http://rivercitywc.com/webcampus/videos/recessionproof.mp4&image=http://www.rivercitywc.com/webcampus/images/recessionproof_slide.jpg&controlbar=none');
so.write('player');
</script></li>

<li><script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script>
 
<div id="player2">This text will be replaced</div>
 
<script type="text/javascript">
var so = new SWFObject('http://www.rivercitywc.com/webcampus/player.swf','mpl','500','280','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=http://rivercitywc.com/videos/03.15.09.flv&image=http://www.rivercitywc.com/webcampus/images/intheknow_slide.jpg&controlbar=none');
so.write('player2');
</script></li>
					
					<li><img src="images/intheknow_slide.jpg" width="500" height="280" alt="" /></li>
				
				</ul>
			</div><!-- END slides -->
			<a href="#" class="prev"><img src="images/PREV.png" alt="" /></a>
			<a href="#" class="next"><img src="images/NEXT.png" alt="" /></a>
		</div><!-- END gallery -->

Also you can see in action at
http://www.rivercitywc.com/webcampus/index.php?

Re: Something I'm doing everytime ?????

I believe your problem is here:

$(function() {
	    $(".slides").jCarouselLite({ 
	        btnNext: ".next",
	        btnPrev: ".prev",
	        speed: 400,
	        visible: 1,
	    });
	});

See how each value has a comma after it?  The last value of visible:1 also has a comma, but it's the last one - so no need for a comma.  Most good browsers will just ignore this, but I've had problems with IE completely breaking just due to this extra comma.  Try removing it and see if it fixes anything.


(Also, "MAC" is not an acronym that stands for anything and should not be all caps! It's short for "Macintosh" - sorry, just a pet peeve of mine I always see online.)