html - Embed Website using iframe but iframe doesn't scroll on IOS -
i tring embed website website using iframe witch works greet on on ipad, scrolling seem lagging or not working. smoothing out scroll action , changing color of scrolls awesome!
here code iam using
<html xmlns="http://www.w3.org/1999/xhtml"> <head> </head> <body> <div id="scroller" style="height: 800px; width: 600; overflow: auto;"> <iframe height="100%" id="iframe" scrolling="auto" width="100%" id="iframe" src="https://docs.google.com/spreadsheets/d/1ziqcvuo27r73tijzqlkvcxdt3kg7kixqlyzrblt7_aq/edit#gid=512 365425" /> </div> <script type="text/javascript"> settimeout(function () { var starty = 0; var startx = 0; var b = document.body; b.addeventlistener('touchstart', function (event) { parent.window.scrollto(0, 1); starty = event.targettouches[0].pagex; startx = event.targettouches[0].pagey; }); b.addeventlistener('touchmove', function (event) { event.preventdefault(); var posy = event.targettouches[0].pagey; var h = parent.document.getelementbyid("scroller"); var sty = h.scrolltop; var posx = event.targettouches[0].pagex; var stx = h.scrollleft; h.scrolltop = sty - (posy - starty); h.scrollleft = stx - (posx - startx); starty = posy; startx = posx; }); }, 10000); </script> </body> </html>
here link can see if like.
thanks in advance
Comments
Post a Comment