Skip to content

Commit

Permalink
Fix when clicking on section on page causing page to jump (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewc-dev authored and rkarthik007 committed Jun 8, 2019
1 parent 2a9d54f commit e6b96b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,11 @@ $(document).ready(() => {

$(() => {
const hash = window.location.hash;
if (hash) $('ul.nav-tabs-yb a[href="' + hash + '"]').tab('show');
if (hash) {
$('ul.nav-tabs-yb a[href="' + hash + '"]').tab('show');
}
$('.nav-tabs-yb a').click(function () {
$(this).tab('show');
window.location.hash = this.hash;
});
});

Expand Down

0 comments on commit e6b96b3

Please sign in to comment.