Whats wrong with this simple jquery function?

Hai folks

slide down works charm. but slide up does not.

$('#bt1').click(function () {
   if(document.getElementById("drop_down_button1").style.display=="none"){
      $('#drop_down_button1').slideDown('slow');
   }else{
       //document.getElementById("drop_down_button1").style.display="none";
       //// if i uncomment above line and comment blow one. then it works.
       $('#drop_down_button1').slideUp('slow');
	
   }	
});

Do you get any errors in your error console? I ask because the above code looks perfectly fine.

hai chris, i use firebug and it does not show any error.

Oops!
all i was strugling to make a toggle display.
just my friend suggessted to use below code and now it works :smiley:
Thanks folks


<script>
    $("#bt1").click(function () {
      $("#drop_down_button1").slideToggle("slow");
    });
</script>