the following works pretty well on click:
$('#form1 #ort_id option').click(
                function () {
                var wrapper = $(this).attr('value');
                
$('#schuppen-wrapper,#kirche-wrapper,#openair-wrapper,#andererort-
wrapper').hide();
                switch(wrapper){
                case "1": $('#schuppen-wrapper').show();  break;
                case "2": $('#kirche-wrapper').show(); break;
                case "3": $('#openair-wrapper').show(); break;
                case "4": $('#andererort-wrapper').show(); break;
                }
                return false;
        });

but when the page loads the <option value="1-4" selected="selected">
should be shown. how can I show the right div, when the page loads?

thank
tom

Reply via email to