Recently i had gone through Scottgu's Blog where he had jotted of Jquery Templates i would like to know when and where to use these templates and where it should not be used. It would be very great of you, if you come forward with some simple examples.
+1
A:
Like any templating system, jQuery templates give you the option to specify your content more declaratively than programmatically. Here are two examples of doing the same thing:
<p>Hello {{name}}! Are you having a good {{day_or_evening}}?</p>
as opposed to:
str = "<p>Hello " + name + "! Are you having a good " + day_or_evening + "?</p>";
In these cases where you're building up bits of HTML which have a few parameters that change then obviously it's much more readable with a template. You need to find the balance yourself for where it's more readable to construct the string programmatically than through a template.
Skilldrick
2010-10-15 08:27:52
Thank you dear for your precious time.
Maxymus
2010-10-15 09:11:14