请告诉我为什么我的下拉菜单在加载时破坏了? Click Here链接。
完整详情:
When the website is loading, its showing all the sub menus present inside and after its loads completly its showing correctly. At the start it should be strong and should not show inside present sub menu...
它有以下java代码。
<link href="css/dcmegamenu.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src='js/jquery.hoverIntent.minified.js'></script>
<script type='text/javascript' src='js/jquery.dcmegamenu.1.3.3.js'></script>
<script type="text/javascript">
$(document).ready(function($){
$('#mega-menu-7').dcMegaMenu({
rowItems: '3',
speed: 'fast',
effect: 'slide'
});
});
</script>
答案 0 :(得分:3)
你没有包含jQuery链接
<script type='text/javascript' src='http://code.jquery.com/jquery-1.8.3.min.js'></script>
通过删除就绪函数
中的$
来尝试此操作
$(document).ready(function() {
// put all your jQuery goodness in here.
});
这是jQuery code。所以你必须添加jQuery源。
答案 1 :(得分:2)
尝试一次:
$(function() {
// Handler for .ready() called.
$('#mega-menu-7').dcMegaMenu({
rowItems: '3',
speed: 'fast',
effect: 'slide'
});
});