javascript - Fire Function if Button or Other Button Is Clicked -
this obvious, because it's hard describe, can't find through searching.
i want if user clicks on of several buttons, 1 event gets triggered. possible? i've tried, doesn't appear work:
$("#button1" || "#button2").click(function() {alert("example")});
try this:
$("#button1, #button2").click(function() {alert("example")});
Comments
Post a Comment