[jQuery] Re: Suggestion on solution for array to new html content

2009-03-24 Thread sliver
Thanks for the response mkmanning! So far that is similar to the solution I am using (with a small change of using html() instead of append() for the main div and no need for appendTo() since the main div is already part of the DOM). I was just wondering if there was an obvious shortcut with

[jQuery] Re: Suggestion on solution for array to new html content

2009-03-23 Thread mkmanning
Why not do two passes, since the array will have a one-to-one correspondence with the divs in the containing div? $(document).ready(function(){ var arr = [{content: 'some html 1', data: 'some data 1'},{content: 'some html 2', data: 'some data 2'},{content: 'some html N', data: 'some data