jquery - Bound different events to different ids in a single statemenet -
is possible have different events different ids grouping them together
e.g
//non working code $("#a").change,$("b").click (function() { //my code here }); i #a have change event , #b click event. (i can multiselect use on , events , id , filter accordingly wondering if can done specific events explicitly added on specific ids (not both) in single statement.
write separate handler method , refer method handler each of events
function handler(){ //my code here } $("#a").change(handler) $("b").click(handler)
Comments
Post a Comment