Make Div Appear and Reappear with javascript

Make a div with the same id as the select input and you should be good to go.


$(window).load(function() {
    $(document).ready(function() {
        $('.group').hide();
        $('#div1').fadeIn('slow');
        $('#div1').change(function() {
            $('.group').hide();
            $('#' + $(this).val()).fadeIn('slow');
        })
    });
});

Leave a Reply