Why does my jQuery animation require an extra click in IE8 to finish?

Posted by Eric Reynolds on Stack Overflow See other posts from Stack Overflow or by Eric Reynolds
Published on 2010-05-24T17:47:04Z Indexed on 2010/05/24 17:51 UTC
Read the original article Hit count: 328

Filed under:
|
|

I am pretty new to jQuery in general, however the following code works perfectly in Chrome and Firefox, but not in IE8. In IE8, I have to click anywhere on the page to start the animation after selecting a radio button. Here is the code:

$("input[name=method]").change(function() {
    if($("input:radio[name=method]:checked").val() == 'installer') {    
        $('#download').slideUp(0).removeClass("vendorSize").text("Download").addClass("installerSize").slideDown(500);      
    }
    else if($("input:radio[name=method]:checked").val() == 'url') {
        $('#download').slideUp(0).removeClass("installerSize").text("Download From Vendor Website").addClass("vendorSize").slideDown(500);
    }
});

Anyone know why this breaks in IE8 but not in the other browsers? If you feel this would work better using .animate (not that I think it should matter), can you provide an example of how to code it?

Thanks,

Eric R

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about radiobutton