I’m not sure if I’m asking the right question or not. But my application heavily relies on Javascript and jQuery to create HTML document. So I have a lot of this “jQuery(“) and then a lot of div.attr(“id”,”123″).
So, is there a better way to do this, or some design pattern to deal with this?
Thanks a lot.
Yes, jQuery Templates. They make it easier to build html with jQuery, you can do:
And get: