title: How to open div smoothly
body: <p>Pls help me how to open div smoothly.I have add script and html code, its working perfectly but div open suddenly with jerk. I want to open my div "#mapsec" smoothly.</p>
  
  <pre><code>function showhide() {
      var div = document.getElementById("mapsec");
      if (div.style.display !== "none") {
          div.style.display = "none";
      }
      else {
          div.style.display = "block";
  
      }
  }
  </code></pre>
  
  <h1>HTML CODE</h1>
  
  <pre><code>&lt;h3&gt;Visit us (&lt;i&gt;&lt;a onclick="showhide()" id="scrollmap" class="mapimg" style="cursor: pointer;"&gt;Map&lt;/a&gt;&lt;/i&gt;)&lt;/h3&gt;
  
  &lt;div id="mapsec" style="display: none; clear: both;"&gt;
      &lt;img
          src="http://www.websitesnmore.com.au/wp-content/uploads/2013/06/map-img.jpg"
          alt="map-img" width="1245" height="350"
          class="alignnone size-full wp-image-4586" /&gt;
  &lt;/div&gt;
  </code></pre>