What would be a good way to show hidden content with javascript, without having the image elements <img src="myimage.jpg"> of the hidden content load their images in google chrome or any other browsers until the content is actually shown?
hiding the content with the css rule display: none will not prevent the images from loading, and I would like to avoid using ajax calls.
EDIT 1 as discussed in the comments, a better alternative would be to use a template. As an example I picked John Resig’s Microtemplating engine:
See fiddle
EDIT 2
As the original poster commented, it’s perfectly possible to grab the contents of a
<script type="text/html">element. Templating engine’s not necessary:First Answer
(see in edits)