Reputation: 864
I want to use jQuery for each with not rendering element how can I do that
$.each($('.single-price .price'), function(){...}
but not render this element
$.not($('.single-price .special .price'), function(){...}
in only one for loop
Upvotes: 0
Views: 556
Reputation: 1261
Select elements first, then pass them to each
:
$('.single-price :not(.special .price) .price').each(function() {
// ... your code here
})
Upvotes: 3
Reputation: 106
You can Use .stop() in between .each(); $('.single-price .special .price').stop();
Upvotes: 0