<input id='rb1' type="radio" name="bafter" checked>
<input id='rb2' type="radio" name="bafter">
js
$(".item").click(function(){
console.log(a); // 39 (that's ok)
if ($('#rb1').prop('checked') == true) {a -=1;}
else {a +=1;}
});
console.log(a);
If rb1
checked result is - 38 (ok)
If rb2
is not checked reusult is - 391 (should be 40)
Any help?