basic ajax question
basic ajax question
Hey - I'm very new to jQuery - I'm trying to dynamically build a list of elements. What I'm thinking is to pull some template html out of an html file, add the item specific information (id, title, etc..), and append() it to the list element. Sound good so far?
Now I have some very basic questions? I can grab my template html and add it to my list with:
-
$.get("template.html",function(data){
$("#vh_list").append(data) ;
});
but I'd like to append some variables to the html returned in 'data' before I append it to vh_list. How do I access each iteration of 'data' and drop a string into it's #title element, for example?