I didn't test, but it seems you have both solutions.
1) jQuery Mobile provides a tap event: http://api.jquerymobile.com/category/events/
2) You can also try this code: Mobile Tap Detection - JSFiddle
Thanks once again Joel.
Ill work through this & let you all know if i'm successful.
Hi Again - Im have tried to work through your helpful solutions & I am having some degree of success but not 100%.
I have added the code & the banner does now expand on a single tap, however I am struggling to understand how I can get the then expanded banner to resize back on a further click or
alternatively how will I get the banner to resize back to it original size at the end of my animation?
This is my compositionReady code...
Hopefully I have explained myself correctly - Thanks for any help, Cheers Brett.
Thank you for all your help. I think I am about 90% there.
I have attached the preview link & also a link to the working file.
My issue now is that I can get the banner to play an animation on the 300x50 stage & then on tap it will expand to 300x250. On a further tap it will revert back to the 300x50..........BUT then it no longer works on further taps, it just goes blank.
Could anyone look at my code & maybe point me in the correct direction.
I also need to add a button on the expanded stage that will then have a c lick tag added to it, would this also be possible as the tap function doesn't seen to like anything placed above it.
Working file download link....
Once again thank you for all you advice - Cheers Brett
It goes blank because you call a label ("main-start") that doesn't exist inside the symbol called "small".
not ok ==> sym.getComposition().getStage().getSymbol("small").play("main-start");
ok ==> sym.getComposition().getStage().getSymbol("small").play("start-small");
Files ==> expanding-test.zip - Box
Joel, you have helped me out tremendously. That is exactly what I was trying to achieve.
Thank you so much, Brett
One last thing Paul - On the expanded stage, is there a way to add a clickable element?
When I place a 0% Opacity rectangle over the stage in the expanded state, it doesn't recognise it as it only see the "tap" expand - compress.
Thank you - Brett
Could you send me a sample?
Here are 2 demo files ==> click versus touchstart.zip - Box
I built new cases. Both were tested on iOS.
I advice you tactileEvents3 because the click event is used. So, it runs everywhere. iOS understand or "translate" a click event to a tactile event.
Note that e.stopPropagation() is required for autonomous events.
Hi again Joel - This version that you sent was exactly what I was trying to create & it's works perfectly.
What I was wondering was on the expanded stage the button that pops up is there a way that the could be a click through to a url?