我正在使用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