problem with jquery each and swich between 2 things
- by moustafa
first see this post
i got this code
$('.yesno').click(function(){
$('.yesno').each(function(i, v){
$(v).removeClass('selected');
});
$(this).addClass('selected');
return false;
});
and html this
<a href="#">
<span class="Yes yesno">Yes</span>
</a>
<a href="#">
<span class="No yesno">No</span>
no the problem when i make more than one vote iam get very big problem
see this
<a href="#">
<span class="Yes yesno">Yes</span>
</a>
<a href="#">
<span class="No yesno">No</span>
</a>
<a href="#">
<span class="Yes yesno">Yes</span>
</a>
<a href="#">
<span class="No yesno">No</span>
</a>
</a>
when click first yes its choose the first yes and hwen iam going to the next yes when click its because selected but the first yes because unselected
i want make some thin make each yes and know is differant of others