RTO_visible_when_tab.js
Helper file documentation for
RTO_visible_when_tab.js.Docs updated: 2025-12-17
Summary
Show/hide elements depending on whether a tabKey is open.
- Exports:
RTObindVisibleWhenTab - Depends on: RTO_tabsList.js, RTO_connector.js (recommended)
- Uses data attributes:
data-rto-display,data-rto-hidden,data-rto-poll,data-rto-visible-tabKey,data-rto-visible-when
What it is
Shows/hides elements depending on tab state (example: show a panel only when a given tabKey is open).
Download
Download RTO_visible_when_tab.jsData attributes
data-rto-visible-when: currently supportstab-opendata-rto-visible-tabKey: the tabKey to watch
Example
<div data-rto-visible-when="tab-open" data-rto-visible-tabKey="billing" style="display:none">
Billing tab is open ✅
</div>
<script src="../RTO_helpers/RTO_connector.js"></script>
<script src="../RTO_helpers/RTO_tabsList.js"></script>
<script src="../RTO_helpers/RTO_visible_when_tab.js"></script>