title: on body click I need to slide up which is slide down using button click(slideToggle)
body: <p>I am beginner for Jquery. I am using simple slide toggle on one button. Initially I am putting div in display none , when ever I am clicking on button I am using slide toggle function. It's working fine. But when I am clicking on body I need to slide Up(display:none) as well as on click of button also. I tried with $('body:not(element)') click function it's not working for me. Plz help me to resolve.</p>
  
  <p>See this fiddle for normal slide functionality <a href="http://jsfiddle.net/Rayudu/qpmqsLan/" rel="nofollow"><strong>SlideToggle Fiddle</strong></a></p>
  
  <p>This fiddle which I tried but not working <a href="http://jsfiddle.net/Rayudu/qpmqsLan/1/" rel="nofollow"><strong>Tried Fiddle</strong></a> </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("#legendButton").click(function(){
      $("#slidetooglelegends").slideToggle("slow");
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="LegendSlideSection"&gt;
  
   &lt;div id="slidetooglelegends" style="width:200px;height:100px;border:1px solid #a3a3a3;background:#fff;display:none;"&gt;
       hello slide
   &lt;/div&gt;
  
   &lt;button id="legendButton" class="btn btn-primary"&gt;Legend&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>