"put links around the images that link to the full size image, then
in your js, capture the click on the images and prevent it from
loading the
image as normal. "
Thanks for this idea, it sems so obvious now I hear it, I ended up
doing something similar, which was just grabbing the images
themselves, getting the src, and splitting the string, that way I get
a nice array of filenames, and as each image has the same filename for
the thumb, full and lightbox version, I can use that array in lots of
places, eg:
var thumbpathsArray = $('main_thumb_table').getElements('img');
var imgFileNameArray = new Array();
thumbpathsArray.each(function(el,index)
{
var imgPathPartsArray = el.src.split("/");
var imgFileName = imgPathParts.pop();
imgFileNameArray[index] = imgFileName;
});
On Jan 10, 5:20 pm, nutron <[email protected]> wrote:
> put links around the images that link to the full size image. if your js
> breaks, users can still see the full size image by clicking the image. then
> in your js, capture the click on the images and prevent it from loading the
> image as normal.
> see examples of lightbox for this sort of thing.
>
> On Fri, Jan 9, 2009 at 8:17 PM, Matt Thomson (via Nabble) <
> [email protected]<ml-user%[email protected]>
>
>
>
> > wrote:
>
> > Hi, I am making a mootools photo gallery. I want to have all my markup
> > in the HTML, and control it with a bit of external mootools. My
> > problem is that the gallery may have 20 thumbnails, and 20 big images.
> > I want the 20 thumbnails to load straight away, but I only want the
> > first big image to load. When the second thumb is clicked on, the
> > gallery will grab the second big image from the server and display it.
>
> > So far I have achieved this by making an array of image sources in the
> > js, and making a function, such that if thumb number 2 is clicked on,
> > then big_img_src_array[2] is loaded. This works, but I have a lot of
> > ugly markup-ish stuff in my js,
>
> > If I put in <img src="myImage.jpg" style="display: none;" /> the
> > browser will still load the image into the cache.
>
> > Is there any way to do things the mootools way, without loading 20
> > giant images when the page loads?
>
> > Thanks,
>
> > Matt.
>
> > ------------------------------
> > View message @
> >http://n2.nabble.com/Images-in-markup-but-not-loaded-into-browser-tp2...
> > To start a new topic under MooTools Users, email
> > [email protected]<ml-node%[email protected]>
> > To unsubscribe from MooTools Users, click here< (link removed) >.
>
> -----
> The MooTools Tutorial: http://www.mootorial.comwww.mootorial.com
> Clientcide: http://www.clientcide.comwww.clientcide.com
> --
> View this message in
> context:http://n2.nabble.com/Images-in-markup-but-not-loaded-into-browser-tp2...
> Sent from the MooTools Users mailing list archive at Nabble.com.