I've been trying to implement swipe on a cycle2 gallery but find the gallery is transitioning two slides at a time. Eventually I've found that this is due to having an additional swiperight event registered on the <body> for a mobile app 'drawer' that is revealed from the left hand edge. This event is affecting the gallery due to the following line (53):
On this line the trigger on <body> has been raised on touchend but the resulting swipe trigger is then raised on a child element also (the cycle gallery).
By modifying start.trigger to $this.trigger the event only fires on the element I wrote the trigger for, however this causes a raft of other problems from what I can see!
I've just loaded the touch events code from jquery.mobile and its working as hoped now. Don't know if you can grab any further inspiration from there?
If you want me to dig in any further I'll be happy to, however if I'm being daft and doing something wrong I'd also appreciate a pointer :smiley:
I've been trying to implement swipe on a cycle2 gallery but find the gallery is transitioning two slides at a time. Eventually I've found that this is due to having an additional
swiperight
event registered on the<body>
for a mobile app 'drawer' that is revealed from the left hand edge. This event is affecting the gallery due to the following line (53):On this line the trigger on
<body>
has been raised ontouchend
but the resultingswipe
trigger is then raised on a child element also (the cycle gallery).By modifying
start.trigger
to$this.trigger
the event only fires on the element I wrote the trigger for, however this causes a raft of other problems from what I can see!I've just loaded the touch events code from jquery.mobile and its working as hoped now. Don't know if you can grab any further inspiration from there? If you want me to dig in any further I'll be happy to, however if I'm being daft and doing something wrong I'd also appreciate a pointer :smiley: