开发者

Jquery: Mouseover event working in everything but firefox

开发者 https://www.devze.com 2023-02-28 05:47 出处:网络
I am using the following Jquery to change a bunch of images when their parent is moused over and switch them back after. I am on a mac so I haven\'t tested firefox for windows but even IE is working h

I am using the following Jquery to change a bunch of images when their parent is moused over and switch them back after. I am on a mac so I haven't tested firefox for windows but even IE is working here which is a shock to the system. Anyone know why this doesn't work in firefox? It throws up no errors but does nothing.

       $('.swfselector').live('mouseover mouseout', function() {
  if (event.type == 'mouseover') {
            $(this).find('.tab').ea开发者_运维百科ch(function() {
                $(this).attr("src", 
                $(this).attr("src").replace(".png", "o.png"));  
             })
   } else {
             $(this).find('.tab').each(function() {
                $(this).attr("src", 
                $(this).attr("src").replace("o.png", ".png"));  
             })
         }
    });


Try:

$('.swfselector').live('mouseover mouseout', function( event ) {
0

精彩评论

暂无评论...
验证码 换一张
取 消