2013年10月31日 星期四

CSS Hover IE 無法正常顯示

用jQuery解決IE CSS Hover無法正常顯示的方法:

解法一:

if( window.BrowserDetect.browser == "Explorer" )
{

        $('.Button').unbind('mouseenter mouseleave').bind('mouseenter mouseleave', function() {
                  $(this).toggleClass('Button-hover');
        });


}


解法二:

$(".Button").hover(function() {

         $(this).css("background-color","#FFE100");
},function(){
         $(this).css('background-color','#C4C4C4');
});






沒有留言:

張貼留言