Hi, I have built a slider that has two possible buttons: one to .toggle, this one is always visible, and then the .click one which is only visable when the slide is open so i wanted it to only close. the problem is when you open with the .toggle and close with the .click then try to re-open with the original .toggle button. it needs 2 clicks of the mouse at that point.
<script type="text/javascript">
  $(document).ready(function(){
    $(".profile_slide_btn").toggle(
     function(){
       $("#sliding_header").animate({ 
         top: "0px"
       }, 300 );
     }, 
     function(){
      $("#sliding_header").animate({ 
         top: "-600px"
       }, 300 );
  });
 $(".profile_slide_btn2").click(
     function(){
       $("#sliding_header").animate({ 
         top: "-600px"
       }, 300 );
     });
  });
</script>
Thanks for any help!!