开发者

Changing default on hover behavoir of image in Firefox

开发者 https://www.devze.com 2023-02-19 17:02 出处:网络
I have an im开发者_C百科age which is disabled, for which, on hover it should be normal \'pointer\' and when enabled it be a \'hand\' This works fine in IE

I have an im开发者_C百科age which is disabled, for which, on hover it should be normal 'pointer' and when enabled it be a 'hand' This works fine in IE But in FF the default behavior, on hover is a 'hand', even when the image is disabled. How do i change this?


CSS should do the trick

img {
     cursor:pointer;
}


$('.selector:disabled').live('hover', function() {
    $(this).css('cursor','default');
}
$('.selector').not(':disabled').live('hover', function() {
    $(this).css('cursor', 'pointer');
}

This is a jquery way of doing it.

0

精彩评论

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