title: jQuery .toggle() not working as expected with second function?
body: <p>I'm trying to create a button to show / hide a div below it, all is working fine, I'm just struggling with the last bit!</p>
  
  <p>I need to distinguish wether it's a show or hide action so I can pass the variable elsewhere, here's what I have..</p>
  
  <pre><code>$(this).find('.hide-close').click(
              function() {
                  $(this).siblings('.dragbox-content').toggle(function() { 
  
                      alert($(this).parent().attr("id") + ' Show');
  
                      },function() { 
  
                      alert($(this).parent().attr("id") + ' Hide');
  
                      }
  
                  );
  
              })
          .end()
          });
  </code></pre>
  
  <p>If use the following code, taking out the second function within toggle(), it works?! But then I don't have a show / hide variable.</p>
  
  <pre><code>$(this).find('.hide-close').click(
              function() {
                  $(this).siblings('.dragbox-content').toggle(function() { 
  
                      alert($(this).parent().attr("id") + ' Show');
  
                      }
  
                  );
  
              })
          .end()
          });
  </code></pre>
  
  <p>Thanks in advance for any help, hopefully it's something really simple I just can't see! :)</p>