jquery typeWatch with Dynamic input fields added on the fly.

Posted by mtyagi on Stack Overflow See other posts from Stack Overflow or by mtyagi
Published on 2010-03-15T00:39:48Z Indexed on 2010/03/15 0:49 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

How can i get the Id of the input field added on the fly? My script adds the input fields on click on the button , using

var ix = 1;
$(template2(ix++)).appendTo("#dataTable tbody");
var template2 = jQuery.format($("#template2").val()); 

I also add this , line after the insertion of the new fields, so it adds the typeWatch to all the .email class fields.

$(".email").typeWatch( { highlight:true, callback:function(){alert("changed search text"); },  wait:750  } );

now, in the callback function , I want to get the Id of the input field typeWatch Callback is triggered.

Please advice.

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about typewatch