iPad - 让 Safari 中的按钮更容易点击?

发布于 2024-12-10 12:53:53 字数 292 浏览 3 评论 0原文

使用iPad,IOS5,有没有办法让浏览器中的按钮更容易点击?我有一个使用 html 5 的网站,我注意到有时必须多次单击按钮才能让 jquery 读取单击事件。这是我使用的按钮的 html:

<button class="button purple">SEARCH</button>

Jquery:

$('.button.purple').click(function() {

//Code goes here

});

Using an iPad, IOS5, is there anyway to make a button more clickable in the browser? I have a website using html 5 and I noticed that I sometimes have to click a button multiple times for the jquery to read the click event. Here is the html for a button I use:

<button class="button purple">SEARCH</button>

Jquery:

$('.button.purple').click(function() {

//Code goes here

});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你是我的挚爱i 2024-12-17 12:53:53

如果该页面上有多个点击事件,您可能需要尝试 event.preventDefault();

$('.button.purple').click(function(e) {

    //Code goes here

    e.preventDefault();
});

If there are multiple click events on that page, you might want to try event.preventDefault();

$('.button.purple').click(function(e) {

    //Code goes here

    e.preventDefault();
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文