This code below runs the destinations area on this my homepage. However it repeats the animation. I need it to fade out whatever is currently displayed and replace with the selection from the dropdown.
I also need it to add a class to .desarea which is the value of the select box.
//Create destination switch
$('#regionselect').change(function(){
var selected = $(this).find(':selected');
$('.regionDetail').fadeOut(function(){
$('.'+selected.val()).slideDown();
});
var count = $('.countrylist').length;
$('.countrylist').slideUp(function(){
if(!--count) {
$('.'+selected.val()).slideDown();
}
});
});
You have
$('.'+selected.val()).slideDown();twice. So it does it twice.