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
In IE the change event isn’t fired directly when you click the radio button, so you have to click somewhere else before it is fired. You can try using the
clickevent instead of the change event, that should work.