在jquery中mousedown / mouseup为ipad工作吗?

问题描述:

我正在使用当前代码:

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

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

这在safari中效果很好但是当我上传并在ipad上查看它时它不起作用?

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

我发现如何为感兴趣的人提供ipad:

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);
});