I am asking this question here for a larger audience - this is something that is not documented.
Using tab switchers in UIkit for my signin form. This is the markup:
<ul class="uk-tab" data-uk-switcher="{connect:'#tabs'}">
<li id="session" class="uk-active"><a href="">New Session</a></li>
<li id="help"><a href="">Help</a></li>
</ul>
<ul id="tabs" class="uk-switcher">
<li id="session">...</li>
<li id="help">...</li>
</ul>
When the window hash is #help
, I need to set the active tab to the "Help" tab. It seems I've accomplished this in part only, with the following:
if (window.location.hash == '#help') {
UIkit.switcher($('[data-uk-switcher]')).show($('li#help'));
}
But I'm missing a step somewhere, because now I can't go back to the "New Session" tab.
How is the method above overriding the built in behaviour? If so, the methodology is obviously incorrect - in which case, what is the correct way to do this?