Jump to content
GreenSock

Steven

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by Steven

  1. I will check it out. I usually just check the result on my mobile device... like this

    http://jsfiddle.net/CPEpf/6/embedded/result/

     

    UPDATE: I took everything out and put it in a single page.

    I get the draggable onClick alert but not the single div.gallery-image alert.

     

    UPDATE 2: Using

    onClick: function() {
        var target = $(document.elementFromPoint(this.pointerX, this.pointerY));
    }

     

    I can find the element that was clicked on but I've read there are compatibility problems... but I'm targeting mobile devices so I don't think it should be a problem.

  2. Thank you for your input Rodrigo but unfortunately this still doesn't allow me to click each individual <div> (or other element).

     

    I would like that when you click on a div.gallery-image something happens.

    Right now, on mobile only, I'm unable to click on a single item.

     

    This code works correctly on desktop browsers : http://jsfiddle.net/CPEpf/6/

    but when I look at it on my Android phone or iOS iPod, nothing is alerted when I click on a single item.

  3. For what it's worth, there's an undocumented "scrollProxy" object that you can use to manually alter the scroll position of a Draggable whose type is "scroll" | "scrollTop" | "scrollLeft". It has a scrollTop() method and a scrollLeft() method that you can feed a value to, like:

    yourDraggable.scrollProxy.scrollLeft(100);

    And you can get the value like:

    var currentScrollLeft = yourDraggable.scrollProxy.scrollLeft();

     

     

    Hi Jack,

     

    I'm having problems with the scrollProxy object.

     

    If you look at this fiddle http://jsfiddle.net/gpYyQ/ and check the console, it keeps telling me scrollProxy is undefined.

     

    But when I look at the Draggable object, I can clearly see it's there.

    What am I doing wrong?

  4. Hello,

     

    UPDATE : I found this answer http://forums.greensock.com/topic/7694-tweento-duration/ that works well. Sorry for the duplicate question.

     

    I created a timeline with labels and tweens. It's basically 4 slides (100% height) that move up or down.

     

    I have a top menu and when I click on an item I want to move the playhead to the right label so i'm using the myTimeline.tweenTo('labelName') which is working fine.

     

    But let's say I'm on my first label and I want to fast forward to the last one when I click on the last menu item.

     

    When I do a tweenTo('lastLabel'), it takes a long time before getting there because it's doing all the transitions (with easing). Is there a way to "skip" the transitions, delays, duration to go to the last label.

     

    I could change :

    timeline.timeScale()
    TweenLite.defaultEase = Linear.easeNone
     

    but I was wondering if there was an easier way.

     

    Thank you.

×