For my project I am starting to get alot of embeded html in my javascript as a result of ajax calls. I want to move them out of there. What is the best practice for this? I was thinking have the elements as a div in the page with display:none then deal with when the javascript needs it.
But If I use this method I need to replace certain string with the data return from my ajax call, any advise on that?
Thanks