Search code examples
htmlcsssliderinternet-explorer-11jssor

Jssor Slider Internet explorer issue


Good Morning,

The following website http://mnb-crossmediadesign.de/vorschau/wiewelhove/pellets.php?lang=de has some slider issues on IE 11. (I did not try any versions before this) It works perfectly fine in chrome and firefox thou.

I have tried different solution examples which I found on the search function like changing the DOCTYPE to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

or adding the meta

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

but nothing seem to fix my issue. The weird thing is also. When Im on that page and I press F5 for refresh, it shows everything correctly. As soon as I go back on that page it is messed up again.

Thanks in advance for your solutions.

Updated information: As far as I see it is only messed up on this test version of the website and not on the original see here: http://wiewelhove.de/pellets.php?lang=de . weird thing, could it be the php version we are using?


Solution

  • Please check the following code,

    //responsive code begin
    //you can remove responsive code if you don't want the slider scales while window resizing
    function ScaleSlider() {
        var refSize = jssor_1_slider.$Elmt.parentNode.clientWidth;
        if (refSize) {
            refSize = Math.min(refSize, 735);
            jssor_1_slider.$ScaleWidth(refSize);
        }
        else {
            window.setTimeout(ScaleSlider, 30);
        }
    }
    ScaleSlider();
    $Jssor$.$AddEvent(window, "load", ScaleSlider);
    $Jssor$.$AddEvent(window, "resize", ScaleSlider);
    $Jssor$.$AddEvent(window, "orientationchange", ScaleSlider);
    //responsive code end
    

    It scales width of slider to refSize while window resizing, you can log the refSize to see what's happening.

    Edit Please remove the following lines in your style.css.

    #jssor_1 {
        width: 100% !important;
    }