Hello,
I'm using chain.js for client-side templating, and so far I like it.
I'm running into a problem with nodes getting stripped out of
templates though. See here for the paste:
http://gist.github.com/44606
and here for rendering it:
http://goldenspud.com/choppedoff.html
If you look at the template in #actions_template, you'll see a div at
the bottom that is in the template, but, at least under FF3 and WebKit
nightly, the div does not show up.
Note that it still doesn't show up even if I remove the ".children()"
line at line 23.
Perhaps this sequence of steps isn't the best way to go, and that
there is something more "correct" to achieve what I want?
$('#actions_template') // find the template
.clone() // keep the template intact
.items(data) // assign data to the copy
.chain() // chain it
.children() // grab its children
.appendTo(parent) // stick it to an element
;
I'll admit I'm still a journeyman when it comes to JavaScript, and my
time to evaluate jQuery and chain.js is running out pretty soon. If
anyone here can help me resolve this I'd be very grateful, and it
could perhaps mean that jQuery+chain.js wins for this app (Python
+Pylons backend, jQuery frontend, scientific plotting, lots of
reusable components, some potentially open sourced).
Thanks!
- Matt