Jquery: Mouseover event working in everything but firefox
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 ) {
精彩评论