jQuery – make .change() work on dynamic input’s
-
If I have a button that creates input’s like so:
jQuery('button').click(function(){ jQuery('div').html("<input />") }) jQuery('input').change(function(){ alert('change!') })Why doesn’t jQuery recognize the newly made inputs with
$('input').change()? how do I get around this? Do I have to push the new inputs into jQuery’s recognition or something?Here’s a jsfiddle w/ the problem: http://jsfiddle.net/Ltkfj3g9/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘jQuery – make .change() work on dynamic input’s’ is closed to new replies.