Skip to content

Instantly share code, notes, and snippets.

@deepak-rajpal
Created April 24, 2013 13:47
Show Gist options
  • Save deepak-rajpal/5452237 to your computer and use it in GitHub Desktop.
Save deepak-rajpal/5452237 to your computer and use it in GitHub Desktop.
In IE Mouse hover fading (such as in menu) not supported because of opacity support not available. Solution: Using css rather than animate, just change color that seems to faded color: But disadvantage is that if there are two color in menu, both will change to same color. so this alternative not completly good.
// Following mouse hover fading not supported in ie because of opacity
jQuery('div#navwrap ul.nav li a').hover(function() {
jQuery(this).animate({opacity: .4}, "fast");
}, function() {
jQuery(this).animate({opacity: 1}, "fast");
});
// Solution: Using css rather than animate, just change color that seems to faded color:
jQuery('div#navwrap ul.nav li a').hover(function() {
jQuery(this).css({'color':'#B2C5E0'});
}, function() {
jQuery(this).css({'color':'#3F6FB2'});
});
// But disadvantage is that if there are two color in menu, both will change to same color. so this alternative not completly good.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment