ok I have 6 buttons, I'm trying to use a jquery listener, when you hover over one of the 6 buttons, it changes the class. im using a for loop for this, heres my code:
$(document).ready(function() {
for($i=1;$i<7;$i++) {
$('#button'+i).hover(function() {
$(this).addClass('hovering');
}, function() {
$(this).removeClass('normal');
});
}
});
each button has an identifier of "buttonx" (x is a number)
help?
source
share