Don't forget you have to apply your behaviors (the change() in this 
case) AFTER the dynamic element has been added to the DOM.  I don't 
think it's going to work if you apply the handlers THEN add the element 
to the DOM.  hmm... something for me to try next time I open up my 
editor... :)

Shawn

guellichs-erbe wrote:
> Hello *,
> 
> I've dynamically ( per javacript) generated <select/> lying in a div
> container (statically defined in <body/>).
> 
> It does not work to bind a function to this select ($
> ("#id_of_select").change(...).
> 
> $("#id_of_div).change(...) does work and is my workaround at the
> moment.
> 
> But this means, that it is impossible to generate markup only
> dynamically, you always have to define your div/span/wathever
> containers.
> 
> Is this right?
> 
> Happy jQueriying
> Uli

Reply via email to