Skip to content

Open product tabs on load.#1304

Merged
Ubersmake merged 2 commits intobigcommerce:masterfrom
Ubersmake:AnchorTabs
Jul 11, 2018
Merged

Open product tabs on load.#1304
Ubersmake merged 2 commits intobigcommerce:masterfrom
Ubersmake:AnchorTabs

Conversation

@Ubersmake
Copy link
Contributor

What?

#1220 but with an additional guard for non-existent tab names.

This only works on page load. Because the hash isn't technically an HTML anchor, browsers have no idea what "anchor" to view and will end up doing nothing.

Additionally, the guard for non-existent tab names might not be necessary. As far as the code is concerned the JS will attempt to operate on nothing. But $activeTab.length > 0 definitely makes sure it doesn't run.

Tickets / Documentation

Screenshots

Tab:
tab

Definitely Not a Tab:
notatab

@bigbot
Copy link

bigbot commented Jul 9, 2018

Autotagging @bigcommerce/storefront-team @davidchin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants