0
我使用下面的jQuery来创建一个下拉切换效果我侧菜单(链接:http://wp.gattoweb.com/gattotestfour/)切换链接下拉不工作
jQuery(document).ready(function(){
jQuery('.site-navigation ul ul').hide();
if(jQuery('.menu-item-has-children').length > 0) {
jQuery('.menu-item-has-children').click(function(event) {
jQuery(this).addClass('toggled')
if(jQuery('.menu-item-has-children').hasClass('toggled'))
{
jQuery(this).children('ul').toggle();
}
return false;
});
}
});
这似乎是做了切换效果的工作,但当我尝试点击其中一个下拉链接时,菜单消失并且不会进入链接页面。
这个代码取代我已经?我试过了,它回到了以前的样子。抱歉,对任何脚本都没有经验!而且你对设计元素完全正确,我认为Bridal是触发器,然后是Weddings and Engagement作为子菜单感谢您指出了这一点! – gattocat
@ gattocat我编辑这个,所以它应该现在与你有什么。 – jkgaddis
添加了这个,它已经恢复正常了。这可能是我添加它的方式,目前我正在使用插件脚本n样式,这可能是问题吗? – gattocat