Page 1 of 1

jQuery - getting attribute values from an Ajax element

Posted: Fri Nov 05, 2010 10:29 am
by EPX
Hi all,

I know I'm probably missing something really simple, but i hope you can help.

I have a page which generates some hidden input boxes via Ajax when a particular button is pressed. I then want to press another button and get jQuery to pull out the value of the hidden input boxes, but i'm hitting the problem that the newly generated elements are not part of the original loaded DOM elements so they are not acknowledged by jQuery.

I know about the .live() which listens for events such as clicks and mouseovers, but has these are hidden elements and they are not going to have events happen to them.

Does anyone know how to allow jQuery to see these hidden elements?

As i said, i'm sure i have missed something really simple here, but you help is much appreciated.

Thanks

Re: jQuery - getting attribute values from an Ajax element

Posted: Fri Nov 05, 2010 11:13 am
by pickle
The fact that they're hidden elements doesn't matter. The event will be fired by the button being clicked anyway.