I have 4 buttons with different id's. When i click on them i need to perform one function. So i need something like this:
$('#button #button').click(function()
I have 4 buttons with different id's. When i click on them i need to perform one function. So i need something like this:
$('#button #button').click(function()
Use a comma :
Separate each
id
with a comma:Easiest would be to add a class to all your buttons like so:
To select the 4 buttons at once you write the following:
If you need to identify which button was pressed, write something like: