Tab-aware visibility helper
Show or hide parts of your UI depending on whether a specific tabKey is currently present.
Best for
Conditional controls, follow-up actions, and cleaner operator workflows.
Load with
RTO_form_api.js and usually RTO_tabsList.js.
Works well with
RTO_openTab_button.js and the status UI pattern.
Summary
Show/hide elements depending on whether a tabKey is open.
- Exports:
RTOVisibleWhenTab(bind(),rescan()) - Depends on:
RTO_tabsList.js(which depends onRTO_form_api.js) - Recommended:
RTO_connector.js(setswindow.RTOconnected)
What it is
A tiny UI helper that toggles elements based on tab state. Typical use:
show a panel only when a given tabKey is currently open (controlled by RTO).
Internally, it uses the current tabs snapshot when available and falls back to a real listTabs request when needed.
Download
Download RTO_visible_when_tab.jsData attributes
data-rto-visible-when:tab-opendata-rto-visible-tabKey: thetabKeyto 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_form_api.js"></script>
<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>
<script>
RTOconnectOnce(1500).then(function(){
RTOVisibleWhenTab.rescan();
});
</script>