Jump to content

jQuery autocomplete on angenerated element

- - - - -

  • Please log in to reply
1 reply to this topic

#1
ferovac

ferovac

    Learning Programmer

  • Members
  • PipPipPip
  • 84 posts
My question is: "is it possible to attach a autocomplete event on a generated textbox " ?

EDIT : and ofcourse how would such a thing be possible ?

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
I assume your question is more related to attaching events to the DOM that does not yet exist, rather than the autocomplete itself. As autocomplete shouldn't cause too much trouble (Plugins/Autocomplete - jQuery JavaScript Library)

As for the event binding your inputbox, you should be able to use the live() function.
Live() takes care of attaching events to stuff that does not yet exist.

This is for click, but I suppose this works for autocomplete as well:

$(".autoInput").live('click', function(event) { ...}






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users