title: Usage of javaScript:void(0)
body: <p>I've been advised to use javascript:void(0) to avoid an unexpected scroll down during an anchor tag click. I was told to use it like this:</p>
  
  <pre><code>&lt;a href="javascript:void(0)"&gt;Click Me&lt;/a&gt;
  </code></pre>
  
  <p>Now, what if the anchor tag has already been referred, say:</p>
  
  <pre><code>&lt;a href="#carousel-main"&gt;Click Me&lt;/a&gt;
  </code></pre>
  
  <p>How do I use javascript:void(0) to avoid the unwanted movement of page on clicking the anchor tag?</p>
  
  <p>This is the carousel code:</p>
  
  <pre><code>&lt;div class="col-md-12 column"&gt;
   &lt;div class="carousel slide" data-ride="carousel" data-interval="5000" id="carousel-main"&gt;
    &lt;ol class="carousel-indicators"&gt;
       &lt;li  class="active"  data-slide-to="0" data-target="#carousel-main"&gt;&lt;/li&gt;
       &lt;li  data-slide-to="1" data-target="#carousel-main"&gt;&lt;/li&gt;
       &lt;li  data-slide-to="2" data-target="#carousel-main"&gt;&lt;/li&gt;
       &lt;li  data-slide-to="3" data-target="#carousel-main"&gt;&lt;/li&gt;
    &lt;/ol&gt;
    &lt;div class="carousel-inner"&gt;
       &lt;div class="item active"&gt;
          &lt;img class="home-img-slideshow" title="Banner1" alt="Banner1" src="image-1.jpg" /&gt;
       &lt;/div&gt;
  
       &lt;div class="item"&gt;           
          &lt;img class="home-img-slideshow" title="Lorem Ipsum Lorem Ipsum" alt="Lorem Ipsum Lorem Ipsum" src="image-2.jpg" /&gt;
       &lt;/div&gt;
  
       &lt;div class="item"&gt;
          &lt;img class="home-img-slideshow" title="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum" alt="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum" src="image-3.jpg" /&gt;
  
       &lt;/div&gt;
  
       &lt;div class="item"&gt;
          &lt;img class="home-img-slideshow" title="Lorem Ipsum " alt="Lorem Ipsum " src="image-4.jpg" /&gt;            
       &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;a class="left carousel-control" href="#carousel-main" data-slide="prev"&gt;&lt;span class="glyphicon glyphicon-chevron-left"&gt;&lt;/span&gt;&lt;/a&gt;
    &lt;a class="right carousel-control" href="#carousel-main" data-slide="next"&gt;&lt;span class="glyphicon glyphicon-chevron-right"&gt;&lt;/span&gt;&lt;/a&gt;
  </code></pre>
  
  <p>
  </p>