Accordion & Google Static Maps API - Prevent images being loaded until needed
Hi,
I have a working accordion, which amonst other things, loads a static map image based on a postcode variable, and it all loads nicely within each Accordion 'Draw' as expected..
My problem is that we have about 50+ draws, each with a map (a dynamic image) so when the page loads, you can see in the browser that the page is downloading 50+ items, and for one thing is seriously slow, and secondly, it blows the limit of x maps per day from Google after a few refreshes of the page..
Is there a way or clever method to stop the Accordion loading this image in the background, but instead only load this Map when the draw is opened?
<accordion code>
...
<div class="map">
<img id="staticmap" src="http://maps.google.com/maps/api/staticmap?center=blah blah...">
</div>
....
</accordion code>
*pulls hair out*
I'd really appreciate a hand
P