简体   繁体   中英

jQuery div hover function not working in Firefox

http://cambridgeuplighting.com/testimonials

This code works in Safari, IE7, and IE8, but not in FF 3.5.7. The code changes the background of the little background icon when you hover over a div.

jQuery(function( $ ){
 $('.oneThird').hover(function(){
  $(this).find('span.icon').css( {'background-position-y': '-60px'} );
 }, function(){
  $(this).find('span.icon').css( {'background-position-y': '0px'} );
 });
}); 

Can someone help? Thanks so much.

background-position-y is not supported by firefox as you can see here . use background-position: 0 -60px; instead (thus including the x and y positions instructions).

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