You should check out jsonT (http://goessner.net/articles/jsont/)

It lets you transform ordinary javascript objects in HTML painlessly. So you
could do:

#myAnchor.append(
 jsonT(
   { id:1, class:3 },
   { self: "<div id='{id}' class='{class}'></div>" }
 )
);


It supports really complex transformations, with functions etc. Anyways
check it out!

Chris
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to