page scrolls to top on modal popup
I feel the culprit is href="#"
What you can do 2 things,
- Just remove
href="#"
Change
<a>
to `<button type="button" id="edit_product" data-id="<?php echo $lat['product_id'];?>" name="id" data-text="Add To Cart" class="my-cart-b item_add add_to_cart">Add To Cart</button>
This should help you.
Notice that i have added type="button"
if you are following 2nd approach.