gpt4 book ai didi

jquery - 使用类将 vclick 绑定(bind)到 url

转载 作者:行者123 更新时间:2023-11-28 01:28:09 27 4
gpt4 key购买 nike

我想用“vclick”类将 vclick 绑定(bind)到我的链接,以便响应非常快。我该怎么做

<!DOCTYPE html>
<html>
<head>
<title></title>


<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body >

<div data-role="page" id="page">
<div data-role="header">
<h1>Header</h1>
</div>
<div data-role="content"><a data-transition="slide" href="#page2" class="vclick">go to page 2</a></div>
<div data-role="footer">
<h4>Footer</h4>
</div>
</div>
<div data-role="page" id="page2">
<div data-role="header">
<h1>Page 2</h1>
</div>
<div data-role="content"><a data-transition="slide" data-direction="reverse" href="#page" class="vclick">back to page one</a></div>
<div data-role="footer">
<h4>Footer</h4>
</div>
</div>
</body>
</html>

我了解到 vclick 可以使触摸响应更快

最佳答案

试用 jQuery FastClick https://github.com/ftlabs/fastclick

FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.

关于jquery - 使用类将 vclick 绑定(bind)到 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31292229/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com