0
你如何循環每個元素之前,每個元素之後單擊元素?jQuery每一個nextAll prevAll
這工作
$(".bar").bind('click',function(e){
e.preventDefault();
$(this).each(function(i,o) {
$(o).css('z-index',i);
});
});
但這
$(".bar").bind('click',function(e){
e.preventDefault();
$(this).nextAll.each(function(i,o) {
$(o).css('z-index',i);
});
});
回報Uncaught TypeError: undefined is not a function
你'nextAll'應的概率是'nextAll()' – Tomanow 2014-12-02 21:13:08
試試這個:'$(本).nextAll()各(...);' – 2014-12-02 21:19:34