views:

165

answers:

2

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?

A: 

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);
});
Annie
A: 

Not exactly.

Apple Docs

Quote:

A clickable element is a link, form element, image map area, or any other element with mousemove, mousedown, mouseup, or onclick handlers. A scrollable element is any element with appropriate overflow style, text areas, and scrollable iframe elements. Because of these differences, you might need to change some of your elements to clickable elements, as described in “Making Elements Clickable,” to get the desired behavior in iPhone OS.

(emphasis mine)

scunliffe
Hmm, I'm not sure about that, but its working perfectly for me on the ipad. :)
Annie