does mousedown /mouseup in jquery work for the ipad?

前端 未结 4 1610
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 16:41

I am using the current code:

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

$(\'body\').mouseup(function() {
                 


        
4条回答
  •  庸人自扰
    2020-12-04 17:33

    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)

提交回复
热议问题