I wish there was a way to do this automatically...
Client Templating with jQuery
http://www.west-wind.com/weblog/posts/509108.aspx
obsoleted by newer stuff
JavaScript Micro-Templating
http://ejohn.org/blog/javascript-micro-templating/
John Resig's classic post
Templating Syntax
http://forum.jquery.com/topic/templating-syntax
more jeresig on templates
Google URL shortener
http://goo.gl/info/XBBf
example with Envoimoinscher, can be useful to quickly document long API URLs