GithubHelp home page GithubHelp logo

IE11 issue about parallax.js HOT 5 CLOSED

langdonx avatar langdonx commented on August 31, 2024
IE11 issue

from parallax.js.

Comments (5)

langdonx avatar langdonx commented on August 31, 2024

I made a more efficient hack-fix by extrapolating those callbacks in setup() into functions and calling them both binding. It will do double work in in anything but IE.

$win
    .on('scroll.px.parallax load.px.parallax', scroll)
    .on('resize.px.parallax load.px.parallax', resize);

scroll();
resize();

from parallax.js.

bradsobie avatar bradsobie commented on August 31, 2024

Having the same issue. When scrolled to top of page on IE11, the images have visibility: hidden. Once you scroll 1 pixel it gets visibility: visible.

from parallax.js.

nckblu avatar nckblu commented on August 31, 2024

Building on what langdonx said about the double work, you can use a detect ie function like so:

       /**
         * detect IE
         * returns version of IE or false, if browser is not Internet Explorer
         */
        function detectIE() {
            var ua = window.navigator.userAgent;

            var msie = ua.indexOf('MSIE ');
            if (msie > 0) {
                // IE 10 or older => return version number
                return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
            }

            var trident = ua.indexOf('Trident/');
            if (trident > 0) {
                // IE 11 => return version number
                var rv = ua.indexOf('rv:');
                return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
            }

            var edge = ua.indexOf('Edge/');
            if (edge > 0) {
                // IE 12 => return version number
                return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
            }

            // other browser
            return false;
        }


        var $doc = $(document),
            $win = $(window);

        $win.on('resize.px.parallax load.px.parallax', resize)
            .on('scroll.px.parallax load.px.parallax', scrollIt);


        if (detectIE()) {
            resize();
            scrollIt();
        }

from parallax.js.

iantic avatar iantic commented on August 31, 2024

I have exactly the same problem, but I don't know where to put the code :(

Please help.

from parallax.js.

wstoettinger avatar wstoettinger commented on August 31, 2024

i'm closing this issue due to inactivity assuming it has been solved in recent versions of the library and/or the browser.

from parallax.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.