Sunday, June 9, 2019

does mousedown /mouseup in jquery work for the ipad?




I am using the current code:



$('body').mousedown(function() {
$('div#extras').fadeTo('fast', 1);
});

$('body').mouseup(function() {
$('div#extras').delay(2000).fadeTo(1500, 0);
});



This works great in safari but when I upload it and check it out on the ipad it doesnt work?


Answer



I found out how to do this for the ipad for those who are interested:



Instead of the code I used in my question, you would use:



$('body').bind( "touchstart", function(e){
$('div#extras').fadeTo('fast', 1);

});


&



$('body').bind( "touchend", function(e){
$('div#extras').delay(2000).fadeTo(1500, 0);
});

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...