0
這裏是我的代碼 nextUntil hasClass jQuery的
我想切換最接近類'.wdm_bundled_item'
上'.mainClass_
ň'
我曾嘗試:
jQuery('.mainClass_1').on('click', function(e){
e.preventDefault();
$(this).nextUntil('.codeByBilal').toggle();
});
做工精細,只是問題是它的當我點擊時切換最後的tr
'.mainClass_4'
有什麼建議嗎?與nextUntil
或別的東西。 謝謝
你可以給你的最後一行另一個類,並執行'.nextUntil('。codeByBilal,.otherClass')'?或者,可以找到某個類缺失的位置,例如'.nextUntil('。codeByBilal,:not(.cart_item)')' –
您可以更具體地瞭解這個問題。請爲這個問題提供一個小工具。 –