Jorre
Jorre

Reputation: 17591

jquery 1.4 Live behaviour on .each?

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?

Upvotes: 5

Views: 5816

Answers (2)

Jimmy Farax
Jimmy Farax

Reputation: 11

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

it worked for me.

Upvotes: 0

Felix Kling
Felix Kling

Reputation: 816840

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.

Upvotes: 6

Related Questions