Chaps,我得到這個列表,不打開其他列表。jquery第一個孩子在fadeIn fadeOut列表不起作用
http://jsfiddle.net/mdamC/147/
我想要顯示的第一個孩子,然後單擊顯示的其他項目。
Chaps,我得到這個列表,不打開其他列表。jquery第一個孩子在fadeIn fadeOut列表不起作用
http://jsfiddle.net/mdamC/147/
我想要顯示的第一個孩子,然後單擊顯示的其他項目。
試試這個小提琴http://jsfiddle.net/mdamC/149/
$("ul#links li a").unbind().bind('click', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).toggleClass('active');
$(".descriptions").fadeOut();
//you must get the index of the parent <li> otherwise the index of the <a> is always 0!
var index = $(this).parent().index();
$(".descriptions").eq(index).fadeIn();
$('.active').removeClass('active');
$(this).addClass('active');
}, function(e) {
$(".descriptions").stop().fadeOut();
});
喜用點擊的錨的HREF,越來越描述DIV和切換it.Please讓我知道,如果你正在尋找其他的東西修改你的代碼http://jsfiddle.net/mdamC/150/ Basicall。
thansk夥計,我的本地版本的所有申報單上顯示無...!「!! – DD77 2011-12-16 13:06:38