I have three input fields as below:
<input type="text" name="address" id="address"/>
<input type="text" name="city" id="city"/>
<input type="text" name="country" id="country"/>
How can i add onChange event to all of these fields at once something like this:
$("select the elements with id address,city,country").bind("change", function() {
//do something
});
use
,in id selector as @Rory saidOR
add a class to all this and call change function
HOWEVER
since it is an input field.. i recommend you to use..keyup(), using
changeyou have to click out of the text box to make it fire.