javascript - Many css ids to the same jquery function -
$("#myinputid1").blur(function()
how can do:
#myinputid1, #myinputid2, #myinputid3 -> same blur function
i believe that's not hard, tried many things , cant!
try this:
$("#myinputid1, #myinputid2, #myinputid3").blur(function(){ //your code });
or other way can check id starts myinputid
:
$('input[id^=myinputid]').blur(function(){ //your code });
Comments
Post a Comment