Menu icon Foundation
Can't disable tooltip for touch

 

I'm trying to disable tooltips for touch devices. I know it is part of the v5.3 docs, but not in the v6.0. However, in the foundation.tooltip.js there seems to be a setting for it:

Tooltip.defaults = {
  disableForTouch: false,

However, I seem unable to override this default value. I've tried with the following combinations:

data-disablefortouch:"true"
data-options="disableForTouch: true"
data-options="disable-for-touch: true"
data-options="disable_for_touch: true"

With this code in the plugin, it seems like the setting should indeed be overriden:

    this.options = $.extend({}, Tooltip.defaults, this.$element.data(), options);

… but nothing seems to work.

Does anyone know how to disable tooltips for touch devices?

tooltiptouchoptions

 

I'm trying to disable tooltips for touch devices. I know it is part of the v5.3 docs, but not in the v6.0. However, in the foundation.tooltip.js there seems to be a setting for it:

Tooltip.defaults = {
  disableForTouch: false,

However, I seem unable to override this default value. I've tried with the following combinations:

data-disablefortouch:"true"
data-options="disableForTouch: true"
data-options="disable-for-touch: true"
data-options="disable_for_touch: true"

With this code in the plugin, it seems like the setting should indeed be overriden:

    this.options = $.extend({}, Tooltip.defaults, this.$element.data(), options);

… but nothing seems to work.

Does anyone know how to disable tooltips for touch devices?