-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add methods to check if widgets are currently shown/expanded/visible or not #15573
Comments
What's your use case? |
I'm frequently updating the tooltip title while it's visible to the user using |
for reference: quick solution: $(selector).data('bs.tooltip') && $(selector).data('bs.tooltip').$tip.is(':visible'); |
I find this more direct & short
Between this and @peterblazejewicz 's solution which one's more robust and tolerant to future changes? |
You should create a new report for any undocumented features you believe should be in there. @mdo Could we have a formal way of checking visibility also for other elements? That could be consistent with the same function name on popover or tooltips. |
It's more up to @fat since he's the JS plugin meister. |
It'll be good to have an |
Right. Should make it for v4. "is shown" seems nice. |
Punting to v4. |
for bootstrap tooltips - thanks for @getub:
|
I'm surprised there's no request for a function that tells if a tooltip (or popover) is visible or maybe I missed it in the issues. The closest I could find was this on Stackoverflow (these are workarounds and could break unexpectedly in a future update).
How about something like:
I understand that it isn't completely deterministic since the result could change due to an animation timeout or mouse event.
The text was updated successfully, but these errors were encountered: