使用ZURB Foundation快速点击触摸设备?(Fastclick for touch devices with ZURB Foundation?)

编程入门 行业动态 更新时间:2024-10-25 16:28:49
使用ZURB Foundation快速点击触摸设备?(Fastclick for touch devices with ZURB Foundation?)

如果我使用ZURB的基金会创建一个响应式网站,我是否需要包括像Fastclick这样的库(通过FTLabs)以避免触摸设备上的300毫秒点击延迟?

似乎图书馆应该包括这个,因为在移动设备上做好事情是其主要目的。

我想,当我考虑它时,似乎fastclick应该包含在每个需要在触摸设备上显示的网站上 - 或者不是......?

If I create a responsive website using ZURB's Foundation, will I need to include a library like Fastclick (by FTLabs) in order to avoid the 300 ms click delay on touch devices?

Seems the library should include this since getting things to act nice on mobile is its main purpose.

I guess, when I think about it, it seems that fastclick should be included on every single website that needs to be displayed on a touch device - or not...?

最满意答案

似乎旧的已接受的答案已不再有效。 Fastclick现在由Foundation使用。

在那里搜索“Fastclick”时,在Foundation Github repo上找到了这个:

在Foundation Github Repo中快速搜索的结果

(来自https://github.com/zurb/foundation/search?utf8=%E2%9C%93&q=fastclick )

另外,我在Foundation Github回购中找到了这个:

// Enable FastClick if present $(function () { if (typeof FastClick !== 'undefined') { // Don't attach to body if undefined if (typeof document.body !== 'undefined') { FastClick.attach(document.body); } } });

(来源: https : //github.com/zurb/foundation/blob/d2c9a9a7e84e53e5eff41ac2f61a8425f0760086/js/foundation/foundation.js )

所以,这基本上意味着你可以根据需要使用Fastclick,而Foundation会为你初始化它,但你也可以决定排除你的libs和Fastclick不会被使用。

Seems like the old accepted answer is not valid anymore. Fastclick is used by Foundation now.

Found this on Foundation Github repo when searching for "Fastclick" there:

Result of Fastclick search in Foundation Github Repo

(From https://github.com/zurb/foundation/search?utf8=%E2%9C%93&q=fastclick)

Also, I found this on Foundation Github repo:

// Enable FastClick if present $(function () { if (typeof FastClick !== 'undefined') { // Don't attach to body if undefined if (typeof document.body !== 'undefined') { FastClick.attach(document.body); } } });

(Source from: https://github.com/zurb/foundation/blob/d2c9a9a7e84e53e5eff41ac2f61a8425f0760086/js/foundation/foundation.js)

So, this basically means that you can use Fastclick if you want and Foundation will initialize it for you but you can also decide to exclude if from your libs and Fastclick will not be used.

更多推荐

本文发布于:2023-08-05 07:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1430180.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:快速   设备   Foundation   ZURB   touch

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!