title: page scrolls to top on modal popup
body: <p>I am developing a shopping cart using bootstrap(front end) and codeigniter. when add to cart item modal popup shows the details of added item. But my issue is page scrolls moves to top on modal popup.</p>
  
  <pre><code>&lt;a href="#" id="edit_product" data-id="&lt;?php echo $lat['product_id'];?&gt;" name="id" data-text="Add To Cart" class="my-cart-b item_add add_to_cart"&gt;Add To Cart&lt;/a&gt;
  </code></pre>
  
  <p>Ajax</p>
  
  <pre><code>$(".product_add").click(function(event) {
  
  var currentId = globalId;
  
  
   $.ajax({
              type: 'POST',
              url: '&lt;?php echo site_url("ajax_controller1/product_add/'+currentId+'")?&gt;',
              data: { id:'1' }, 
              success:function(response){
                $("#cart_container1").html(response);
                  $("#myModal3").modal('show');
       }
    });/* Aajx */
  
  
  
  }); 
  </code></pre>
  
  <p>Modal</p>
  
  <pre><code>&lt;div class="modal fade" id="myModal3" tabindex="-1" role="dialog" style="overflow: visible;"&gt;
                  &lt;div class="modal-dialog" role="document" style="overflow: visible;"&gt;
                      &lt;div class="modal-content modal-info" style="overflow: visible;"&gt;
                          &lt;div class="modal-header"&gt;
                              &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;                        
                          &lt;/div&gt;
                          &lt;div class="modal-body" id="cart_container1"&gt;
  
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>I have done the following to overcome this issue</p>
  
  <pre><code>$('a.add_to_cart').click(function(e) {
      e.preventDefault();
  });
  
  body.modal-open {
      overflow: visible;
  }
  </code></pre>
  
  <p>This is my demo website link</p>
  
  <blockquote>
    <p><a href="http://cableandmedia.com/ayurstore/" rel="nofollow noreferrer">http://cableandmedia.com/ayurstore/</a> </p>
  </blockquote>