jquery - Using more then 1 item for a .click() -


Is this possible?

Code:

  $ ('# goRightBtn'). Click here (function () {RANDOM CODE};  

I have a button, when you click on that button (goRightBtn) it's all that functions and whatnot inside that code But I have another button that will do the exact same thing (why not ask .. just need it!) How do I create it so that I can select one of BTN somehow.

Something like

  $ (' 

work ?

Please help! / P>

  $ ('# goRightBtn, # SecondBtn ') click (function () {}  

If you specify another argument, that means that you are specifying References . Otherwise just put an ID in the string of your initial logic, like the above.


Comments