title: How to add Animation in toggleClass functon in Jquery
body: <p>I am making a div which would show on button click and hide on clicking again.I am using toggleClass function of jquery. The problem is I need animation while the div opens and closes. I have tried transition:1s, in all relevant classes and even on body, but in vain.
  This is the fiddle: <a href="http://jsfiddle.net/9dq2p7dw/105/" rel="nofollow noreferrer">http://jsfiddle.net/9dq2p7dw/105/</a></p>
  
  <p>Here is the code for my jquery:</p>
  
  <pre><code>$(document).ready(function(){
  $(".view").click(function(){
  
  $(".view-more").toggleClass("hide show", 500);
  
  });
  
  });
  </code></pre>