我正在使用JQuery的一些下拉導航功能。工作很好。現在我只是添加了Cycle JQuery Plugin,我只能得到一個工作,具體取決於我在頭部列出他們的順序。我已閱讀關於jQuery.noConflict();功能,但並不確定把它放在哪裏。這是我得到的。jQuery的衝突 - 如何使用jQuery.noConflict();
HTML
<head>
<title>#</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta content="online restaurant employee scheduling, employee scheduling, scheduling software, employee scheduling software, restaurant scheduling, restaurant scheduling software, restaurant schedules, restaurant employee scheduling, online scheduling, online scheduling software" name="keywords"/>
<meta content=" easy-to-use, Web-based restaurant labor management solutions and workforce management software offers flexible, effective and improved communication for employees and managers." name="description"/>
<meta content="index, follow" name="robots"/>
<meta content="no-cache" http-equiv="cache-control"/>
<meta content="no-store" http-equiv="cache-control"/>
<meta content="0" http-equiv="expires"/>
<meta content="no-cache" http-equiv="pragma"/>
<meta content="Rh52pxT6lFEqOVMlSt7QpOVHb325OHdlGkWZ0QMUSbU" name="google-site-verification"/>
<link rel="stylesheet" href="stylesheets/style.css" media="screen" />
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="js/jquery.cycle.all.min.js" type="text/javascript"></script>
<script src="js/menu.js" type="text/javascript"></script>
<script src="js/slideshow.js" type="text/javascript"></script>
</head>
當它的結構是這樣我Cycle插件作品,但不是導航下拉菜單。下面是相應的.js與資產淨值存在文件:menu.js和Cycle插件的存在:slideshow.js
menu.js
$(document).ready(function() {
$('#nav li').hover(
function() {
//show its submenu
$('ul', this).slideDown(100);
},
function() {
//hide its submenu
$('ul', this).slideUp(100);
}
);
});
slideshow.js
$('#slideshow').cycle({
speed: 200,
timeout: 0,
pager: '#tabs',
pagerEvent: 'mouseover'
});
那是slideshow.js的全部內容?如果是這樣,你可能希望在加載頁面之後運行它,比如menu.js。 – 2010-01-15 05:43:01