所以我在jquery中有一个手风琴菜单,标题上的链接不起作用,或者他们这样做,手风琴功能失败。
$(document).ready(function () {
$('#main-navi').accordion({
event: 'click',
animated: 'bounceslide',
active: false,
fillSpace: true,
header: 'ul',
navigation: true
});
});
如果我删除“header”属性,菜单上的链接会起作用,但手风琴会失败,反之亦然。我尝试过添加navigationFilter并没有成功。提供给其他此类挑战的答案失败或者该人没有使用相应的插件,而是元素上的点击事件。
...和html
<ul id="main-navi">
<li><a href="/index.aspx" title="Home">Home</a></li>
<li><a href="/grants.aspx" title="Grants">Grants</a>
<ul>
<li><a href="/teacher_induction.aspx" title="Teacher Induction">Teacher Induction</a></li>
<li><a href="/grant_recipients.aspx" title="Grant Recipients">Grant Recipients</a></li>
<li><a href="/teacher_grants.aspx" title="Teacher Grants">Teacher Grants</a></li>
<li><a href="/principal_grants.aspx" title="Principal Grants">Principal Grants</a></li>
<li><a href="/special_grants.aspx" title="Special Grants">Special grants</a></li>
</ul>
</li>
<li><a href="/scholarships.aspx" title="Scholarships">Scholarships</a></li>
<li><a href="/about.aspx" title="About">About the Foundation</a></li>
<li><a href="/contribute.aspx" title="Contribute">Contribute</a></li>
<li><a href="/inspire.aspx" title="Inspirational Stories">Inspirational Stories</a></li>
<li><a href="/press.aspx" title="Press Materials">News Ticker/Press Materials</a></li>
<li><a href="/contact.aspx" title="Contact Us">Contact Us</a></li>
</ul>