I have two radio buttons, to which I have assigned change handlers to show/hide certain divs based on the selection:
$("input[name='pick_up_point']").change(function()
{
if($("input[name='pick_up_point']:checked").val() == "pick_up_airport")
{
$("#pick_up_airport_div").slideDown();
$("#pick_up_attraction_div").hide();
}
else if($("input[name='pick_up_point']:checked").val() == "pick_up_attraction")
{
$("#pick_up_attraction_div").slideDown();
$("#pick_up_airport_div").hide();
}
});
This works fine, except for when I change the options in quick succession (mouse clicks or arrow keys), the div that is meant to hide is still displayed. If I change slideDown() to show() the issue does not occur.
This issue occurs in both Internet Explorer 8 and Firefox, is it a known bug (jQuery 1.4.2) or am I doing something wrong here?