Comments (1)
To get this working, we need to do some management of the URL hash. Here's the behavior I've decided on (for now).
- On page load, activate the tab that matches the URL fragment, if any. Leave the URL as is.
- When the hash is changed by clicking on an internal link, respond to the hashchange event to activate the tab that matches the URL fragment, if any. Leave the URL as is.
- When a tab is clicked, discretely clear the URL fragment on the hash using replaceState. This ensures that subsequent internal links will trigger the hashchange event.
from asciidoctor-tabs.
Related Issues (20)
- Sync tabs on hash change
- Tabs sync can cause content in view to jump HOT 1
- Feature request: installation instructions for NixOS HOT 2
- Align terminology with accessiblity guidelines for tabs HOT 1
- CSS to prevent table from overflowing has unwanted side effects
- Implement role attribute HOT 1
- Add option to save synced tab selection across pages HOT 3
- Only sync tabs with congruent tablists
- Add is-loaded to tabs blocks on next tick following initialization
- Allow sync group ID to be specified explicitly HOT 1
- Nested tabsets HOT 3
- Promote explicit ID on tab HOT 1
- Make default tab selection configurable HOT 2
- Don't remove open block enclosure if block has metadata (style, id, role, etc.) HOT 1
- Automatic tab number should respect document order
- Incorrect restriction of nodejs 16, but actually opal-compiler transpile code for nodejs 8+ HOT 1
- "skipping reference to missing attribute" in tabs HOT 3
- Error when using the extension with asciidoctor.js version 3.0.2 HOT 2
- Toggling external content HOT 1
- Opal throws an error with Antora HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-tabs.