JQuery: animate() doesn't work as expected in IE...

Posted by swalkner on Stack Overflow See other posts from Stack Overflow or by swalkner
Published on 2008-12-02T13:27:24Z Indexed on 2010/05/13 17:54 UTC
Read the original article Hit count: 245

Hi,

I'm getting crazy with this IE 7...

==> hhttp://neu.emergent-innovation.com/

Why does following function not work in IE 7, but perfectly with Firefox? Is there a bug in the animate-function?

function accordion_starting_page(){
    // hide all elements except the first one
    $('#FCE-Inhalt02-ContentWrapper .FCE-Fade:not(:first)').css("height", "0").hide();
    $('#FCE-Inhalt02-ContentWrapper .FCE-Fade:first').addClass("isVisible");

    $('div.FCE-Title').click(function(){

        // if user clicks on an already opened element => do nothing
        if (parseFloat($(this).next('.FCE-Fade').css("height")) > 0) {
        	return false;
        }

        var toHide = $(this).siblings('.FCE-Fade.isVisible');

        toHide.removeClass("isVisible");

        // close all opened siblings
        toHide.animate({"height": "0", "display": "none"}, 1000);

        $(this).next('.FCE-Fade').addClass("isVisible").animate({"height" : "200"}, 1000);

    	return false;
    });
}

Thank you very much for your help...

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about animate