jquery-mobile – jQuery移动拖放

前端之家收集整理的这篇文章主要介绍了jquery-mobile – jQuery移动拖放前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在玩的jQuery UI的拖放功能,它在我的网站上工作,但当我在iPad上导航到我的网页,那么div不拖动 – 页面本身上下移动。

我已经在head标签

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" />
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/le-frog/jquery-ui.css" type="text/css" media="all" />
<script src="http://www.google.com/jsapi"></script>
<script>
google.load("jquery","1");
google.load("jqueryui","1");
google.setOnLoadCallback(init);
</script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script>

解决方法

Excellent sample solutions

jQuery UI Touch Punch is a small hack that enables the use of touch events on sites using the jQuery UI user interface library.

Currently,07001 user interface library does not support the use of touch events in their widgets and interactions. This means that the slick UI you designed and tested in your desktop browser will fail on most,if not all,touch-enabled mobile devices,becuase jQuery UI listens to mouse events—mouSEOver,mousemove and mouSEOut—not touch events—touchstart,touchmove and touchend.

That’s where jQuery UI Touch Punch comes in. Touch Punch works by using 07002 to map 07003 to their mouse event analogs. Simply include the script on your page and your touch events will be turned into their corresponding mouse events to which jQuery UI will respond as expected.

As I said,Touch Punch is a hack. It 07004 some of jQuery UI’s core functionality to handle the mapping of touch events…

原文链接:https://www.f2er.com/jquery/184204.html

猜你在找的jQuery相关文章