I am using Jquery to set some flag whenever input elements value get changed.
I wrote a simple script which is working fine but I observed that the function get called only when control get out of the input element.If user types something and keeps the control in the same input then function is not called.
I want to execute the function whenever input elements value get changed irrespective of where the control is.
Here is my code
$("input,textarea").live('change',function ()
{
// Set flag
});
I am using live() to bind change() method to dynamicaly added input elements.
~ Ajinkya.
Use keyup/keydown event instead of change: