add autocomplete facility for dynamically added input tag

Posted by hunt on Stack Overflow See other posts from Stack Overflow or by hunt
Published on 2010-04-02T14:42:13Z Indexed on 2010/04/02 14:43 UTC
Read the original article Hit count: 317

Filed under:
|
|

I am creating autocomplete functionality on an input tag using following code.

$('.query').autocomplete({ serviceUrl:'http://localhost/main/finder.php', minChars:2, delimiter: /(,|;)\s*/, // regex or character maxHeight:400, width:400, zIndex: 9999, deferRequestBy: 0, //miliseconds onSelect: function(value, data){ } });

Now the problem is my input element is added dynamically so for first input tag autocomplete is working but when i add one more input tag then it fails for the second one.

so i need some facility that live() provide in jquery ...

please do post the solution

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript