[jQuery] Optimizing code with JQuery

2009-10-14 Thread Frederic Laruelle
Would appreciate some help on identifying the best way to utilize JQuery to build DOM objects in memory before inserting them into the document, here is some sample (abbreviated) code, which depicts what i am trying to do: function Item(JSON) { this.JSON = JSON; this.Node = docum

[jQuery] Best way to construct DOM objects

2009-10-15 Thread Frederic Laruelle
Hi, JQuery (is new to me and) seems very good at querying the document object and modifying it. I am looking to create document fragments, assemble them, then insert them into the document object. eg, creating tables with variable contents and amounts of columns... Is this a use case that JQuer

[jQuery] Re: Best way to construct DOM objects

2009-10-16 Thread Frederic Laruelle
Tks Dave and Karl, it helped! Fred~ On Thu, Oct 15, 2009 at 7:05 PM, Dave Methvin wrote: > > There are a lot of ways to accomplish this. Karl's post demonstrated > one way to create larger fragments directly with jQuery. In addition > to .append() you can look at using the .wrap() methods. > >

[jQuery] How to obtain Object (key) names?

2009-10-16 Thread Frederic Laruelle
Hi, I;m looking for a way to obtain key names from a JSON object: eg "options": [ {"Option1" : ["Value1", "Value2"]}, {"Option2" : ["Value3", "Value4"]}, {"Option3" : ["Value5", "Value6"]} ] so, i'd like to consume this JSON in a wa