A rather simple question that I feel has a simple solution to, but can't seem to think of the right way of going about solving.
I have a set of buttons laid out in a 3 x 3 format, that I want to change attributes of when clicked, but independently. I gave them all the same class, but differentiated them using id's.
Is there a way to write, in one line for a group of ID's to do the same thing? Or do I have to redundantly write out each button's call.
I guess to put it simply, can I write
$('.ready').click(function(){
if('.ready'.is('#7') || '.ready'.is('#8') || '.ready'.is('#9')){
execute code.
}
});
Any help would be greatly appreciated!
if ($(this).is("#7, #8, #9"))