Thanks FND, worked instantly and l have the impression that it is faster. I will try to get some basic understanding about the jquery stuff. The code looks more readable too me than most of the javasript that have around for generating tables etc.
Have a nice day, Okido On 24 Aug, 09:25, FND <[email protected]> wrote: > > Could you give us an example how to build a table by changing the DOM > > directly. > > Sure: > > --------------- > > (function($) { // use "$" as local alias for jQuery > > var table = $("<table />"); > $("<tr />"). > append("<th>Title</th>"). > append("<th>Date</th>"). > appendTo(table); > > var tiddlers = store.getTaggedTiddlers("foo"); > for(var i = 0; i < tiddlers.length; i++) { > var tiddler = tiddlers[i]; > var link = createTiddlyLink(null, tiddler.title, true); > var timestamp = tiddler.created. > formatString("YYYY-0MM-0DD 0hh:0mm"); > var row = $("<tr />").appendTo(table); > $("<td />").append(link).appendTo(row); > $("<td />").append(timestamp).appendTo(row); > > } > > table.appendTo(place); // assumes "place" is a DOM element > > })(jQuery); > > --------------- > > (I've kept it basic - there are ways to optimize this and to make it > more elegant, but would have made this example more complex.) > > -- F. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.

