Forum Moderators: open

Message Too Old, No Replies

jQuery Question

Script not working in IE8.

         

LostInFL

4:59 pm on Apr 1, 2010 (gmt 0)

10+ Year Member



In the script below I aim to create a fading effect in a horizontal navigation setup. When you hover over the link the opacity goes 100% to fade the link in completely visible. Basically from gray to white based on the opacity and my personal css settings. I left the selectors I used in place in my example.

This works as intended in FF and Safari but not in IE8.

The code is based off of an example I found online and when I test the demo displayed from the original creator of the example, it works in IE.

I am stumped on why it's not working now for me. All I did was reverse the opacity values and point it at my css selector.


$(function() {
$("#navigation li a").css("opacity","0.7");

$("#navigation li a").hover(function () {
$(this).stop().animate({
opacity: 1.0
}, "slow");
},

function() {
$(this).stop().animate({
opacity: 0.7
}, "slow");
});
});

whoisgregg

4:04 pm on Apr 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure if jQuery automates this, but opacity in Internet Explorer is set using either:

-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);