我的手风琴出了问题
trouble with accordion I am making
我正在为学校制作手风琴,我觉得它应该能用。我知道,在if-else声明之前,我什么都做对了。任何建议都感谢
$(document).ready(function () {
//
// Set up a click event handler for clicked <li>
//
$('#accordion li').click(function() {
// find first ul that is a child of this (the clicked <li>)
var $nextUL = $(this).children('ul:first-child');
// Select all siblings of the clicked <li> and then
// select any direct children <ul>'s
// that are visible - this is so we can close any visible
// <ul> before opening the <ul> for the clicked <li>
var $visibleSiblings = $(this).siblings().children('ul:visible');
// If any other <ul>s are visible, slide the visible <ul>
// up and then, after the slide up is complete, slide down
// the clicked <li>'s <ul> into view
if ($visibleSiblings.length > 0) {
$visibleSiblings.slideUp('normal', function() {
$nextUL.fadeIn('normal');
});
} else {
// either no <ul>s were open (open the clicked item)
// or the user clicked on the currently open one so close it
$nextUL.slideToggle('normal');
}
});
});
Jquery fadeIn()的持续时间没有"normal"。
$nextUL.fadeIn('normal');
参考http://www.w3schools.com/jquery/eff_fadein.asp
速度:可选。指定渐变效果的速度。默认值为400毫秒可能值:
milliseconds
"slow"
"fast"
相关文章:
- jQuery 手风琴问题在这里
- jQuery的嵌套手风琴菜单问题
- 我的手风琴出了问题
- WordPress FAQ 手风琴自定义帖子类型 - 匿名函数问题.
- JS/CSS 手风琴滑动过渡问题
- 实现 Twitter 引导手风琴时遇到问题
- 垂直手风琴菜单溢出问题
- JQuery 手风琴在添加内容和对齐时遇到问题
- 手风琴问题即6-9.
- jQuery 手风琴菜单 - 默认情况下隐藏子菜单时遇到问题
- 滑动开关-手风琴式常见问题解答
- 引导手风琴菜单打开和关闭的问题
- 手风琴作为页脚样式问题
- jQuery手风琴标签的颜色问题
- Javascript标签手风琴问题
- 在一个页面上使用多个jQuery UI控件实例有问题.手风琴控件的多种用途
- 手风琴高度问题
- angular引导手风琴绑定问题
- 多手风琴与mootools的问题
- JQuery手风琴高度问题