People tell me how you can configure this counter for each div, when I click on the plus or minus value changes in other blocks. How can I make count change in only one div? tried with parent (), siblings () fails to properly configure the count.
<div class="_minus"> <span>-</span> </div> <div class="_count">5</div> <div class="_plus"> <span>+</span> </div> $('._plus').click(function(){ $('._count').html(+$('._count').html() + 1); }); $('._minus').click(function(){ $('._count').html(+$('._count').html() - 1); });