$(‘#filedset’).find(“select, input, textarea”).change(function() {
alert($(this).val());
});
if I use this code when I change anything on my dropdownlistbox I am getting alert but when I change anything on my Input or textarea changed text i am getting on alert?
is that something i am doing wrong?
thanks
The
changeevents for these fire when they lose focus normally (e.g. click outside), if you want the handler to execute as you type, I recommend using the.keyup()event instead (so you get the right value,keydownwould be the value without the current key taken into account).Like this:
Or if you have lots of and/or dynamic elements, you can use
.delegate(), like this: