views:

32

answers:

1

Say I have an array, that contains data that I want to display in a html table. (sort of how gmail has all the data in js objects)

I have this data in an array so I can do ajax type operations like updating/deleting/sorting of the data.

Does jQuery have templates where I can create a template for a given row, and then just loop through my javascript array/json object and then inject the row into the table?

this is a common pattern, but I don't have any experience with it so I am looking for the best practice. I know people use templates for this.

+3  A: 

There is a jQuery plugin available for this called jTemplates. You can get it here. I also dug up this SO question which lists some other alternatives you may want to consider.

JonathanK