0

I need to upgrade from jQuery 1.7 to jQuery 1.8, but the backgroundPosition animation is failing after the upgrade. There are no error messages in the Firebug console at all. Has anyone else had experience with the backgroundPosition animation failing from 1.7 to 1.8?

jQuery(navSelector).hover(function(){                   
      jQuery(this).find('a').stop().animate({"backgroundPosition":"(0 -40px)"},{duration:150});         
    },
    function(){             
      jQuery(this).find('a').stop().animate({backgroundPosition:"(0 0)"}, {duration:75});   
    });
});
4

3 回答 3

1

animate backgroundPosition 自 1.5 以来已被破坏 - 显然它不应该出现在任何版本中

于 2012-12-02T10:54:57.270 回答
0

1.8 版本有很多错误,尤其是在 IE9 和 IE10 中。下载 1.8.1,你应该很好。这是更改:http ://blog.jquery.com/2012/08/30/jquery-1-8-1-released/

于 2012-09-11T21:00:30.813 回答
0

它没有坏..它现在的工作方式不同了

$arrow.animate({'background-position-x': '0px', 'background-position-y': '0px' }, 300);
于 2013-05-27T22:01:26.107 回答