Multiple jQuery in the same place
I'm using multiple jQuery in the same page.
- menu
- picture slider
- picture carousel
- fancybox
when used individually they work perfectly. However, when combined in the same page they work on safari, firefox, chrome, opera, etc except for IE.
I've tried the noconflict() script and it did not work. (I think might be doing it wrong) Any ideas are appreciated.
Thanks in advance!
here is the code:
<!--JS STARTS-->
<!--MAIN NAV .JS-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"> </script>
<script type="text/javascript" src="js/ddsmoothmenu.js"> </script>
<script type="text/javascript" src="js/menu-settings.js"> </script>
<!--MAIN NAV .JS ENDS-->
<!--QUICK RESERVATION CALENDAR TOGGLE-->
<script type="text/javascript" src="js/toggle.js"></script>
<!--QUICK RESERVATION CALENDAR TOGGLE .JS ENDS-->
<!--FANCYBOX-开发者_如何学C->
<script type="text/javascript"
<script type="text/javascript" src="js/jquery.fancybox-1.3.4.pack.js"></script>
<!--FANCYBOX .JS ENDS-->
<!--FOOTER SLIDESHOW-->
<script type="text/javascript" src="js/jquery.tinycarousel.min.js"></script>
<!--FOOTER SLIDESHOW .JS ENDS-->
<!--PROMO PICTURE SLIDESHOW-->
<script type="text/javascript" src="js/jquery2.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.js"></script>
<!--PROMO PICTURE SLIDESHOW .JS ENDS-->
<!--DOCUMENT READY-->
<script type="text/javascript">
$(document).ready(function(){
$('.slideshow').cycle({fx:'fade', speed:'100000', timeout: 10000, next:'#next', prev:'#prev'});
$('#slider1').tinycarousel({ display: 7 });
$("a.fancybox").fancybox();
});
</script>
<!--DOCUMENT READY ENDS-->
- You actually don't need to reference the same library of the same version each time you employ a new plugin. Do it once.
- NoConflict is used when you might overload the $ operator with another library (like mootools)
- Please post a link to a page so we can maybe advise on what exactly does not work.
This line is interfering:
<script type="text/javascript" src="js/jquery2.js"></script>
It's loading another OLD (1.1.2) copy of jQuery. Remove this and it should work correctly.
精彩评论