Is there a way to assign multiple ids to share one click event?
Code:
//this is what i'm doing now - to much code
$("#button1").click(function(){
alert('test');
});
$("#button2").click(function(){
alert('test');
});
$("#button3").click(function(){
alert('test');
});
$("#button3").click(function(){
alert('test');
});
Code:
//is this possible
$("#button1" or "#button2" or "#button3" or "#button4" ).click(function(){
alert('test');
});