views:

805

answers:

2

Does jQuery allow us to use .each loops for live elements?

I'm creating radio buttons on the fly and need to loop over all of them, but the .each loop doesn't seem to work on live elements.

If jquery is not supporting this kind of live looping, is there any other way to accomplish this?

+5  A: 

live() only works for event binding. The only thing that comes to my mind is to put all code in a function an execute it again after you inserted the elements.

Felix Kling
thanks, that helped indeed
Jorre
A: 

at the end of the loop, initialise the radio buttons.

it worked for me.

Jimmy Farax