简体   繁体   中英

.animate() doesn't work in IE10 but works in IE9, IE8, IE7, Chrome, and FF

On this website, when you mouse over the boxes, a div slides in from the left. For some reason, it works on every modern browser except IE10. On IE10, nothing happens when you mouse over the boxes. The code for this is below. I included the surrounding code in case there is something in there that is causing this. Also, nothing shows up in the console for IE10 which is making it frustrating to debug this. If someone can take a look and see where I went wrong, it would be a huge help to me.

  $(function () {
    var time_effect = 400;
    var effect_name = 'easeOutQuart';

    // Hovers
    var hovers = function () {
      $('.project-mask').hover(function () {
          $('.description', this).stop().animate({
            left: 0
          }, 50);
       }, function () {
          $('.description', this).stop().animate({
            left: -280
          }, 50);
       });
       $("a.single-image").fancybox({
         transitionIn: 'none',
         transitionOut: 'none',
         overlayColor: '#000',
         overlayOpacity: 0.6
       });
    };

    //Extracted quicksand block
    var applyQuicksand = function (selector, quicksandArgs) {
      $('.all').quicksand(selector, quicksandArgs);
      $('.filter a').removeClass('selected');
    };

    var objArgs = {
      quicksandFunction: applyQuicksand,
      quicksandArgs: {
        duration: time_effect,
        attribute: 'data-id',
        easing: effect_name,
        adjustHeight: 'auto',
        useScaling: false,
        enhancement: hovers
      }
    };

    //Call hovers for initial load
    $('.all').quicksand($('.everything article'), objArgs.quicksandArgs);

    $('.filter-all').click(objArgs, function (e) {
      objArgs.quicksandFunction($('.everything article'), objArgs.quicksandArgs);
      $(this).addClass('selected');
      e.preventDefault();
    });

    $('.filter-web').click(objArgs, function (e) {
      objArgs.quicksandFunction($('.web article'), objArgs.quicksandArgs);
      $(this).addClass('selected');
      e.preventDefault();
    });

    $('.filter-print').click(objArgs, function (e) {
      objArgs.quicksandFunction($('.print article'), objArgs.quicksandArgs);
      $(this).addClass('selected');
      e.preventDefault();
    });
  });
});

The problem is with QuickSand. It has issues with IE10

You should try and get the latest version for QuickSand from GitHub

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