[jQuery] Re: Inserting rows of DIVs to create a list

2009-03-26 Thread nmiddlew...@gmail.com
Thank you! This is exactly what I'm after Cheers, Nick On Mar 26, 4:34 pm, mkmanning wrote: > "a dynamic list" implies something more semantic than a row of divs, > say a UL or DL...but if you want divs, here's a quick example: > > >         > > > $(document).ready(function(){ > $('#

[jQuery] Re: Inserting rows of DIVs to create a list

2009-03-26 Thread mkmanning
"a dynamic list" implies something more semantic than a row of divs, say a UL or DL...but if you want divs, here's a quick example: $(document).ready(function(){ $('#template div').clone().find('input').attr ('tmp_input','your_new_id').end().find('button').text('Hello').end ().appendT

[jQuery] Re: Inserting rows of DIVs to create a list

2009-03-26 Thread nmiddlew...@gmail.com
Hi, thanks for your reply... I was thinking of storing the template in the DOM so it's visible by our web designer to tweat. How would I read that template (DIV block) into a javascript variable? Thanks for your help! On Mar 26, 3:44 pm, MorningZ wrote: > of course it's possible. > > y

[jQuery] Re: Inserting rows of DIVs to create a list

2009-03-26 Thread MorningZ
of course it's possible. you'd use: - a variable that contains the string that is the template - JavaScript's ".replace" method to fill in the ID and HTML also, there's plenty of template plugins out there (chain.js, jTemplate) On Mar 26, 11:34 am, nmiddleweek wrote: > Hello, > > I'm tryin