Skip to content

Commit

Permalink
Fix with configurator tab hotlinking
Browse files Browse the repository at this point in the history
  • Loading branch information
JakedUp committed Jan 20, 2024
1 parent 7771021 commit 26fbf1f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions @config/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ const App = Vue.createApp({
}
},
mounted() {
let $navTabs = jQuery(`.nav-tabs .nav-link`);
if (window.location.hash) {
jQuery(`.nav-tabs .nav-link[data-bs-target="${window.location.hash}"]`).click();
jQuery(`.nav-tabs .nav-link`).on('shown.bs.tab', function (event) {
window.location.hash = $(event.target).attr('data-bs-target');
});
$navTabs.filter(`[data-bs-target="${window.location.hash}"]`).click();
}
$navTabs.on('shown.bs.tab', function (event) {
window.location.hash = $(event.target).attr('data-bs-target');
});
}
});

Expand Down

0 comments on commit 26fbf1f

Please sign in to comment.