Quantcast
Viewing all articles
Browse latest Browse all 10

jQuery.appendTemplate

Appends a template from file onto an element.


Usage:

$(element).appendTemplate(url, args[]);

url: template url
args[]: dynamic list of arguments that goes into the template


Example code:

$.getJSON("data/data.json",
  function(data){
    $.each(data, function(i, item){
      $("#list").appendTemplate("my.template", item.url, item.text);
    });
});



Author:

See my blog for more
http://csharptutorial.blogspot.com/2010/10/jqueryappendtemplateurl-args....


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>