Hi All -

First time post, and first time working with jQuery.  I have a form
that hides two divs (one specific to bridges and the other div for the
rest of the buildings) on page load.  A user selects from a drop down
list which building type they want to search for, and then from that
selection, one of the hidden slides down.  I have this working, but I
would like to be able to add a toggle like function to the drop down.

<script type="text/javascript">
   $(document).ready(function(){
        var opt1 = $("#brProducts");
        var opt2 = $("#bProducts");
        opt1.hide();
        opt2.hide();
        $("#sType").change(function(){
                var hearValue = $("#sType option:selected").val();
                if( hearValue == "st1"){
                        opt1.slideDown('slow');
                }else{
                        opt2.slideDown('slow');
                }
        });

});
</script>

Reply via email to