0 Replies Latest reply on Oct 13, 2015 3:15 AM by pauld12489944

    Mouse Scroll - Safari crashes

    pauld12489944

      are there any wonderful geniuses that can answer this for me - in my compositionready I have the following for mouse scroll through timeline. but Safari crashes when loading the page

      presumably because Apple disable the scroll function. can anyone tell me how to rather disable the function for safari or an equivalent function for safari?

       

      // Works in firefox

      $(window).bind('DOMMouseScroll', function(event) { // to enable scroll for entire window use this

      //sym.$("Rectangle2").bind('DOMMouseScroll', function(event) { //to enable scroll for a selected div in firefox

                  //alert(event.originalEvent.detail);

                  var dirf = event.originalEvent.detail > 0 ? 'Up' : 'Down';

                  var velf = Math.abs(event.originalEvent.detail);

                  $(this).text(dirf + ' at a velocity of ' + velf);

                  //return false;

                  if(dirf == 'Up')

                  sym.play();

                  else

                  sym.playReverse();

              });

       

       

      //Works in other browsers

      $(window).bind('mousewheel', function(event) { // to enable scroll for entire window use this

      //sym.$("Rectangle2").bind('mousewheel', function(event) { //to enable scroll for a selected div in other browsers

                  //alert(event.originalEvent.wheelDelta);

                  var diro = event.originalEvent.wheelDelta > 0 ? 'Up' : 'Down';

                  var velo = Math.abs(event.originalEvent.wheelDelta);

                  $(this).text(diro + ' at a velocity of ' + velo);

                  //return false;

                  if(diro == 'Up')

                  sym.play();

                  else

                  sym.playReverse();

              });