简体   繁体   中英

Why does this javascript NOT work on Windows 8.1's IE11? (It works on the latest version of Firefox, Chrome, even Windows 7's IE11)

This piece of javascript works on the latest version of Firefox, Chrome, even Windows 7's IE11.

However, for some reason, on Windows 8.1's IE11 and only on Windows 8.1's IE11, it doesn't execute properly.

$('[data-toggle="tab"]').on('click', function(){
    $('.tab-pane').removeClass('animated flipInY');
    setTimeout(function () {
        $('.tab-pane').addClass('animated flipInY');
    },
    10);
});

Link to fiddle: http://jsfiddle.net/5Z9x6/2/

The CSS transition is from animate.css http://daneden.github.io/animate.css/ . It works flawlessly on modern web browsers; it's not the issue. The issue is with my javascript.

Edit#1: Apparently the stupid thing works properly when I zoom in (over 100%); and half work when zoom out (less than 100%). It just doesn't work at 100%. Can I tag this as weirdest bug ever? xD

Edit #2: And even when zoomed in over 100%, it doesn't work if inside a container div with fixed width.

Ahah!

I tracked this one down, kinda-sorta.

Your code actually works. However, for some reason the Win8.1/IE11 combo takes more screen space to actually execute that animation.

So, load your code again, then use the Control-Minus key and shrink the text as small as you can until you can just make out your navigation buttons. Click on your front and back and you'll notice the animation does run.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM