Passing object as data attibute (popover, data-bs-delay)
Created by: rlidwka
I want to specify a delay for bootstrap popover using data attributes, different values for 'show' and 'hide'.
I'm trying data-bs-delay='{"show":500,"hide":100}'
, but it shows an error:
TypeError: TOOLTIP: Option "delay" provided type "string" but expected type "(number|object)".
It worked before in bootstrap 3.3, see https://github.com/twbs/bootstrap/issues/13874 and stackoverflow.
Now the code that parses JSON is apparently gone. :(
How can we solve it?
- get JSON parsing back?
- maybe separate attributes
data-bs-delay-show
,data-bs-delay-hide
- maybe there is some HTML5 trickery to put an object into data-attribute I'm not aware of?
issue may be similar to https://github.com/twbs/bootstrap/pull/34259