jquery - MagicScroll, I can't make it work on iPad, iPod nor iPhone -
I am working on this site
I am using jQuery, MagicScroll and TimeLineMax . This link MagicScroll
My problem is that (via Safari) after trying to MagicScroll debug, why I can not understand that working iPad, scroll to the iPod or iPhone (swipe) Does. I really hope you can help me, thank you very much Please ask me for more information.
If (modern .touch) {var myScroll; $ (Document) .ready (function () {// iscroll $ (Wrap "# content-wrapper"). AddClass ( "scrollContainer"). WrapInner ( '& lt; div class = "scrollContent" & gt; & Lt; / div & gt ;;); // Controller Controller = New Scroll Magic (In Container: "#Content-Cover", Global Skiinnops: {Trigger Hook: "On Lavay"}}) // iScroll myScroll = new Scroll scroll to mycroll.on ("scroll", "scroll", "scroll", "scroll", "scroll", "scroll", "scroll", "scroll", "scroll", "scroll, scrollbars: true, scrollbars: true, useTransform: false, useTransition: false, probeType: 3}); () {Controller.update ();}); // Scroll position calculation using child offset instead of parent scrollbops When calculated to; controller. ScrollPos (function () {return -myScroll.y;}); // height of refresh, so all SetTimeout (function () {myScroll.refresh ();}, 0) ; $ ("#content-wrapper"). ("Touchend", "a", function (E) {//. For some reasons there is nothing dirty to work ... e.preventDefault (); if ($ (This). Haas Class ('Arrow')) $ (this). Trigger ('click'); And window Place = hr = $ (this) .attr ("href");}); // manual set high (so high is available within 100% scroll container) $ (document) .on ("generalization", function () {$ ("section"). Css ("min-height", $ (window ) .height ()) .Parent ("Scrollmagic-pin-spacer"). CSS ("minimum height", $ (window). Hi ());}); $ (Document) .trigger ("orientationchange"); // init document.documentElement.ontouchstart = true; Document.addEventListener ( 'touchmove', function (e) {e.preventDefault (); var touch = e.touches [0]; // window.console.log (touch. PageX + "-" + touch.pageY); }, false); DocumentkaddEventListener ( 'Tcstart', function (e) {e.preventDefault (); var touch = e.touches [0]; // it works! But the site does not have to scroll the window. Touch Consoleklog ( . PageX + "-" + touch.pageY);}, false); }); } Else {// Init Control Controller = New ScrollMagic ({globalSceneOptions: {triggerHook: "onLeave"}}); }
I have more code in each page, each one looks like this:
$ (document) .ready (function () {pin = New timelinemax () .add (TweenMax.from ("# homeSlide1", 0.5, {top: "0%", margintop: 0}) .add ([TweenMax.to ("# homeSlide1", 1, {left: '-' + $ (window). Vithth () + 'px'}), Twin Max. ( "# Homslaid 2", 1, {left: 0 'PX'}))) Kadd (Tibimaks. ( "# HomeSlide 3 ", 1, {left: '0px'}) .add (TweenMax.to (" # homeSlide4 ", 1, {left: '0px'})) View = New ScrollScene ({triggerElement:" Section # Home " , Period: $ (window) .winnerHeight ()}) .on ("progress", function () {}). Tine (PIN) .setPin ( "Section # Home") .addTo (controller);});
I hope you can help me, thanks!
Comments
Post a Comment