MorningStar
MorningStar

Reputation: 176

fadeOut not working in IE7/IE8

I'm not quite sure why this bit of jQuery isn't working in IE7 & IE8. Does anyone have any ideas what could be causing this?

Upvotes: 0

Views: 573

Answers (2)

MorningStar
MorningStar

Reputation: 176

I got it, I just needed to remove position:relative and it fades out perfectly. I'm not quite sure why that is though...

Upvotes: 0

Naftali
Naftali

Reputation: 146302

Well for one thing since you are using jQuery do this without the inline js:

$('input[type=checkbox]').click(function(){
    var checkbox = this;
    if (checkbox.checked) {
        $("#message1").stop(true, true).show().fadeOut(10000);
        $("#message2").hide();
    }
    else {
        $("#message1").stop(true, true).hide();
        $("#message2").stop(true, true).show().fadeOut(10000);
    }
});

Just doing this might fix the IE problem

Fiddle: http://jsfiddle.net/maniator/xMSwQ/5/

Upvotes: 2

Related Questions