的JScript
// Wait for the page and all the DOM to be fully loaded
$('body').ready(function() {
// Add the 'hover' event listener to our drop down class
$('.dropdown').hover(function() {
// When the event is triggered, grab the current element 'this' and
if ($(this).find('.sub_navigation').is(":visible")) {
// find it's children '.sub_navigation' and display/hide them
$(this).find('.sub_navigation').slideUp();
} else {
$(this).find('.sub_navigation').slideDown();
}
});
});
首先,这是小提琴//
我正在使用wordpress来创建我的网站... (如果那很重要) 有人帮助我让下拉菜单更好地工作。 但是自从我添加新的JQuery脚本后,链接甚至都无法正常工作。 我试着将鼠标悬停在它上面,但没有菜单掉线。
当我在小提琴上盘旋时,它会起作用。 为什么是这样? 我该如何解决这个问题?! :(