http://padilicious.com/code/touchevents/
- Started
- Last post
- 5 Responses
- JamesBoynton
Hello
I am looking to use this with jq cycle to on an ipad you can swipe between images.
Can anyone let me know what to change 'swipedElement.style.backgroundC... = 'orange';' to order to achieve this?
function processingRoutine() {
var swipedElement = document.getElementById(triggerE...
if ( swipeDirection == 'left' ) {
// REPLACE WITH YOUR ROUTINES
swipedElement.style.backgroundCo... = 'orange';
} else if ( swipeDirection == 'right' ) {
// REPLACE WITH YOUR ROUTINES
swipedElement.style.backgroundCo... = 'green';
} else if ( swipeDirection == 'up' ) {
// REPLACE WITH YOUR ROUTINES
swipedElement.style.backgroundCo... = 'maroon';
} else if ( swipeDirection == 'down' ) {
// REPLACE WITH YOUR ROUTINES
swipedElement.style.backgroundCo... = 'purple';
}
}Cheers
James
- JamesBoynton0
It's not come through very well...
- dbloc0
have you tried the demo?
- dbloc0
cool...haven't messed with swipe yet.
- JamesBoynton0
Yeah, got the demo working but trying to work out how to change what happens on swipe is harder than i thought...