How do you handle large repeated UI elements with JQuery

Posted by jpoz on Stack Overflow See other posts from Stack Overflow or by jpoz
Published on 2010-05-22T00:10:22Z Indexed on 2010/05/22 0:40 UTC
Read the original article Hit count: 303

Filed under:
|

Howdy,

Here's the situation:

You have a very complex UI element that is repeated in a list. Each has a menu on it, buttons, it hides and shows subelements, buttons for switch it's state, etc, etc. The elements are populated via JSON so you have to construct the elements and the functionality of the fly.

What's the best way to accomplish this with JQuery? Where would you save the reusable template for the DOM structure? How would you add the behavior on? $().live? .livequery? onclick? manual after every JSON get?

I guess I just see a lot of people doing different things. What's your experience with performance?

Any insight would be much appreciated.

Thanks, JPoz

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-live