Bob Ippolito is a smart man.
MochiKit also provides some convenient DOM manipulation tools, such that swapping in a whole table takes only 3 or 4 lines of code:
swapDOM( $('mytable'),
TABLE({'id':'mytable'},
TBODY(null, [TR(null, TD(null, "a cell"))] ) );
(assuming you already had a DOM element w/ id='mytable')
A quick caveat, though: Internet Explorer 6 is picky about tables, and requires that a table created via the DOM have a TBODY or nothing will be displayed.
No comments:
Post a Comment