Calling multiple ID's for one event
Hello all!
I'm trying to figure out a way to call multiple ID's listeners for a single click event. I'm not sure if I'm explaining myself right, here is an example...
I don't want to do this:
-
$("#id1").click(function(){
DO SOMETHING HERE
});
$("#id2").click(function(){
DO SAME AS ID1
});
$("#id3").click(function(){
DO SAME AS ID1
});
Instead, I'm trying to find a way to have one click event on multiple IDs, something similar to this:
-
$("#id1"),$("#id2"),$("#id3").click(function(){
DO SOMETHING HERE
});
The only problem with that statement is the last ID in the row works, but the rest do not.
Any suggestions?