• I have no experience of JS. I have a theme on a website that is no longer being supported. It is working fine, except that the images on a gallery page are not displaying on Internet Explorer, but work perfectly on all other browsers.

    Having Googled the problem, and trying to update all the JS and jQuery files, the problem appears to relate to the jquery.preloader.js file. I have seen a number of suggested corrections to this file, but they do not appear to apply to my particular version. This is a copy of my file:-

    Can anyone help me please?

    // JavaScript Document

    jQuery(function(){
    jQuery(“#content img”).wrap(“<div />”);
    });
    $.fn.preloader = function(options){

    var defaults = {
    delay:200,
    check_timer:300,
    ondone:function(){ },
    oneachload:function(image){ },
    fadein:500
    };

    // variables declaration and precaching images and parent container
    var options = $.extend(defaults, options),
    root = $(this) , images = root.find(“img”).css({“visibility”:”hidden”,opacity:0}) , timer , counter = 0, i=0 , checkFlag = [] , delaySum = options.delay ,

    init = function(){

    timer = setInterval(function(){

    if(counter>=checkFlag.length)
    {
    clearInterval(timer);
    options.ondone();
    return;
    }

    for(i=0;i<images.length;i++)
    {
    if(images[i].complete==true)
    {
    if(checkFlag[i]==false)
    {
    checkFlag[i] = true;
    options.oneachload(images[i]);
    counter++;

    delaySum = delaySum + options.delay;
    }

    $(images[i]).css(“visibility”,”visible”).delay(delaySum).animate({opacity:1},options.fadein,
    function(){ $(this).parent().removeClass(“preloader”); });

    }
    }

    },options.check_timer)

    } ;

    images.each(function(){

    if($(this).parent(options.preload_parent).length==0)
    $(this).wrap(“<div class=’preloader’ />”);
    else
    $(this).parent().addClass(“preloader”);

    checkFlag[i++] = false;

    });
    images = $.makeArray(images);

    var icon = jQuery(“<img />”,{

    id : ‘loadingicon’ ,
    src : ‘img/loader.gif’

    }).hide().appendTo(“body”);

    timer = setInterval(function(){

    if(icon[0].complete==true)
    {
    clearInterval(timer);
    init();
    icon.remove();
    return;
    }

    },100);

    }

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘gallery pictures not loading in Internet Explorer’ is closed to new replies.