Does anyone know why this code might not work? touchmove and touchend do not execute only touchstart because that\'s a seperate event and function :)
$(\'input\'
What does the console say when you open your site / trying to run the method? :)
//Gerner
The event names in the first argument to ".live()" need to be separated by spaces, not commas.
$('input').live("touchmove touchend", function (e) {
I think this would work
$('x').live("ontouchmove, ontouchend", function (e) {
//do stuff
if (e.type == 'ontouchmove'){
//do stuff
}
else{
//do stuff
}
});
First off, your event variable should be the parameter e
rather than event
.
Second, when testing for equality, you need two equals signs: ==
. One equals sign is the assignment operator.