我在我的网站(http://www.simpleprods.com)中添加了Jquery的引用,以获取事件vmousedown、vmouseup等。我只需要这些,虽然JQuery手机恼人地添加了一些丑陋的,自动加载消息到我的网页。它100%来自JQuery手机。我只想要vmousedown,vmouseup和vmousemove,我不需要任何加载消息和橙色框。我已经找到了如何取消消息,但橙色框就是无法摆脱。
有人知道该怎么做吗?,我很高兴有人能告诉我,如果没有JQuery手机所拥有的所有其他东西,就能得到vmousedown,vmouseup和vmousemove .
发布于 2013-03-15 19:09:08
您可以重新构建jQuery移动框架,使其仅具有所需的功能。
去这个网站:
http://jquerymobile.com/download-builder/
选择:
虚拟鼠标绑定
之后,只需单击,构建我的下载。
示例:
<!DOCTYPE html>
<html>
<head>
<title>jQM Complex Demo</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script type="text/javascript" src="http://www.dragan-gaic.info/js/jquery-1.8.2.min.js"></script>
<script src="jquery.mobile.custom.js"></script>
<script>
$(document).on('vmousedown', '[data-role="content"]', function(){
alert('asdas');
});
</script>
</head>
<body>
<div data-role="page" id="index">
<div data-theme="a" data-role="header">
<h3>
First Page
</h3>
</div><p></p>
<div data-role="content" style="height: 100px; width: 500px; background: #aabbcc;">
<div data-role="popup" id="initialpopup" data-overlay-theme="a" data-theme="a">Foobar</div>
</div>
<div data-theme="a" data-role="footer" data-position="fixed">
</div>
</div>
</body>
</html> 您只需要从构建器工具中提供一个jquery.mobile.custom.js文件。
发布于 2013-03-15 19:38:54
确保您没有在<body>标记中包含脚本。这会导致加载标记在不应该出现的情况下出现。
https://stackoverflow.com/questions/15440200
复制相似问题