当我添加mootools脚本时,我页面中的幻灯片停止工作。如何解决?
<!--Script-->
<script type='text/javascript' src="js/jquery.1.3.2.js"></script>
<script type='text/javascript' src='js/jquery.cycle.all.min.js'></script>
<script type='text/javascript' src='js/presentationCycle.js'></script>
<!--mootools for dropdown-->
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/elSelect.js"></script>
<script type="text/javascript">
<!---//
window.addEvent('domready', function(){
var mySelect = new elSelect( {container : 'mySelect'} );
var mySelect2 = new elSelect( {container : 'mySelect2'} );
var mySelect3 = new elSelect( {container : 'mySelect3'} );
var mySelect4 = new elSelect( {container : 'mySelect4'} );
});
//-->
</script>
答案 0 :(得分:1)
presentationCycle.js编写得很糟糕 - 它使用$而不是jQuery(而且mootools也使用$)
您必须将presentationCycle包含在:
中(function($) {
...
})(jQuery);
除此之外,请阅读: