使用touchstart关闭iphone / ipad上的jQuery Tools工具提示 [英] Closing jQuery Tools tooltip on iphone/ipad with touchstart

查看:112
本文介绍了使用touchstart关闭iphone / ipad上的jQuery Tools工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果检测到iphone / ipad / ipod,我会运行以下代码:

I have the following code being run if an iphone/ipad/ipod is detected:

$('.tooltip-trigger').tooltip({offset: [20, -110],relative:true, events: { def: 'touchstart,blur'} });

我通过声明def:'touchstart'获得了初步触摸而不是悬停,但是框不会关闭并调用另一个触摸开始,如def:'touchstart,touchstart'不起作用。也没有def:'toggle'对我来说似乎是合乎逻辑的。

I have got the initial touch working instead of on hover by declaring def:'touchstart', however the boxes do not close and calling another touchstart like def: 'touchstart,touchstart' does not work. Neither does def: 'toggle' which seems logical to me.

任何想法?

推荐答案

我通过在智能手机和平板电脑的工具提示上放置一个关闭按钮来解决这个问题

I resolved this by placing a close button on the tooltip for smartphones and tablets only

这篇关于使用touchstart关闭iphone / ipad上的jQuery Tools工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆