Using ajax and jQuery Append() to put some items into a div which is all working well. My question is can I set up some sort to template for the div instead of having to put all the html code in the Append() line?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have a look at jQuery templates. It seems like it does what you need.
http://api.jquery.com/template-tag-each/
See the examples in that page. I think what you are looking for is something like this