So we have an Ipad2 at home and I noticed that some webpages have gesture enabled parts of the page. I thought I would try to hunt down how this works. I have never written Javascript before so this is mostly copied from some guys block that is in a foreign language I cant read. However I got it to work! I used Uncharted 3 images since that is what I am working on right now.
Ipad and Iphone webpage gesture example
The only way I could get it to work was to use three Javascripts that were on the guys page. One of the scripts is basically unreadable because its unformated and all one line of code that spans many lines. I am sure if I look into this more I could find the original source or a better version of the code.
Scripts that you must have loaded to make this work:
www.rtrowbridge.com/scripts/jquery.cycle.all.min.js
www.rtrowbridge.com/scripts/jquery.touchwipe.1.1.1.js
www.rtrowbridge.com/scripts/jquery-1.4.2.min.js
Other than those three scripts you just need to use a short bit of javascript to make it work. Check out the source code of the example page.
I welcome others doing this since its cool to have more interactive webpages with gestures.
Cheers,
Ryan
Recent Comments