The location detect button in my website is not working in mobile when I put it on live domain from localhost. The location detect button works properly fine in localhost in every responsive view but stops working on live domain in the mobile screen view of the website. Here's the code
<button class="btn btn-link btn-lg link-no-style watch-video js-video-popup hidden-lg hidden-md" id="myLocation">
<i class="fa fa-map-marker"></i> <?=t("Detect Location")?>
</button>
This is the function I've used in it
$('body').on('click', '#myLocation', function () {
navigator.geolocation.getCurrentPosition(success_geo);
return false;
})