<![CDATA[ Pre-Load first image of a gallery - My Forums]]> https://forums.modx.com/thread/?thread=70386 <![CDATA[Re: Pre-Load first image of a gallery]]> https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-530818 http://forums.modx.com/thread/98144/snippet-not-working-right-all-the-time#dis-post-530695

But I'm having problems with Gallery item IDs over 100, for some reason it stops pulling in the first image when it gets over 100, can anyone help fix this at all?]]>
jonahnaylor Sep 01, 2015, 01:30 AM https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-530818
<![CDATA[Re: Pre-Load first image of a gallery]]> https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-431478 I'm not good yet with php coding so i can't yet design the code for-it, but i believe it should be possible]]> monady Jul 27, 2012, 08:45 AM https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-431478 <![CDATA[Re: Pre-Load first image of a gallery]]> https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-398917
[[!GalleryItem? &id=`1`]]


]]>
boemaars Nov 03, 2011, 09:47 AM https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-398917
<![CDATA[Re: Pre-Load first image of a gallery]]> https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-394314
<SCRIPT language="JavaScript">
    <!--
      preload_image = new Image(25,25); 
      preload_image.src="http://mydomain.com/image.gif"; 
    //-->
    </SCRIPT>


And a non JS solution:

in your CSS file:

div#preload { display: none; }


At the bottom of the page:

<div id="preload">
   <img src="http://domain.tld/image-01.png" width="1" height="1" alt="Image 01" />
   <img src="http://domain.tld/image-02.png" width="1" height="1" alt="Image 02" />
   <img src="http://domain.tld/image-03.png" width="1" height="1" alt="Image 03" />
</div>
]]>
BobRay Sep 21, 2011, 11:45 PM https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-394314
<![CDATA[Re: Pre-Load first image of a gallery]]> https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-394248
kinda urgent on this end, this issue is the last thing that keeps the site from going online ...]]>
s1Mon Sep 21, 2011, 03:05 PM https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-394248
<![CDATA[Pre-Load first image of a gallery]]> https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-393894
this is pretty much what I'm trying to do:
http://forums.modx.com/index.php?topic=35806.0
But, well, just with Gallery, not MaxiGallery.

So everything works perfect, I do have the thumbs and the gallery pictures at the very same page. Here's how it looks like:
http://planungsbuero-ried.at/modx/index.php?id=7

But all I want to do is to pre-load the first (or indeed, any) of the small images so that when you click on the link to the page, you won't find a blank space insead of the first image. Simply initiate one of the images without having to click on a thumb first.
(I think this should be pretty straight-forward, but I just can't find anything pointing me into the right direction; isn't there just a simple parameter to solve this?)

Here's the call:
<table style="width: 950px;" border="0">
<tr>

<td rowspan="2" style="width: 600px;">

[[!GalleryItem]]
[[!+galitem.image:notempty=`
<div class="image">

<img class="[[+galitem.imgCls]]" src="[[+galitem.image]]" alt="[[+galitem.name]]" />

</div>
`]]

</td>


<td style="margin-left: 350px; padding: 5px;" valign="top">
<h2>[[*pagetitle]]</h2>
<p>
  <span>[[*longtitle]]</span><br />
  <span>[[*description]]</span></p>
<p><br />
  <span>[[*introtext]]</span></p></td>

<tr>
  <td style="margin-left: 350px; padding: 5px;" valign="bottom">
  
  [[!Gallery? &album=`1` &toPlaceholder=`gallery`]]
<!-- <h1><a href="[[~[[*id]] &galAlbum=`[[+gallery.id]]`]]">[[+gallery.name]]</a></h1>
<p>[[+gallery.description]]</p>-->
 
[[+gallery]]
  
  
  </td>

</tr>
</table>


Thanks for any help guys!
Simon]]>
s1Mon Sep 19, 2011, 01:12 PM https://forums.modx.com/thread/70386/pre-load-first-image-of-a-gallery#dis-post-393894