Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other NextGen gallery (WP plugin) preloader?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35159
    Matteo
    Member

    Hi there,

    how would you code an image preloader for a NextGen gallery?
    I’d like to preload all my images (30-40) after the thumbnails are created to speed up the lightbox slideshow.

    #90619
    heartnet
    Member

    Using Javascript
    Using jQuery

    There’s many more tutorials if you google it

    #90625
    Matteo
    Member

    Thanks for your reply.
    I guess my main problem was to get the images from NextGen in the first place, so the jQuery approach won’t work for me.

    So far I’ve managed to load the images but when I run the slideshow it appears Shutter Reloaded is not taking them from cache.

    Here’s the code:

    in footer.php:

    In a js plugin:

    function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
    window.onload = func;
    } else {
    window.onload = function() {
    if (oldonload) {
    oldonload();
    }
    func();
    }
    }
    }



    function preload(images) {
    if (document.images) {
    img1 = new Image();
    img1.src = images;
    }
    }

    ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.