peachananr / onepage-scroll

Create an Apple-like one page scroller website (iPhone 5S website) with One Page Scroll plugin
http://peachananr.github.io/onepage-scroll/Demo/demo.html
9.54k stars 2.06k forks source link

< a href links not working on iPad #337

Open Great2BNate opened 6 years ago

Great2BNate commented 6 years ago

Links inside the main section on iPad are not clickable without this function. . . $(document).ready(function() { $("a").on("click touchend", function(e) { var el = $(this); var link = el.attr("href"); window.location = link; }); });

StR1nG7 commented 4 years ago

function touchstart(event) { var touches = event.originalEvent.touches; if (touches && touches.length) { startX = touches[0].pageX; startY = touches[0].pageY; $this.bind('touchmove', touchmove); } event.preventDefault(); }

There is function touchstart() begins on line 38. At the end of this function is event.preventDefault(). I just removed this preventDefault and my links work.