I have this function below but it does not work on iphone6:
$(document).on("click touch", "a[href^='#']", function (e) {
var id = $(this).attr("href");
if ($(id).length > 0) {
e.preventDefault();
// trigger scroll
scrollMagicController.scrollTo(id);
// if supported by the browser we can even update the URL.
if (window.history && window.history.pushState) {
history.pushState("", document.title, id);
}
}
});
I have tried vclick
:
$(document).on("vclick"...
But it still does not work.
Any ideas?