Dismiss docs sidebar when scrolling left on mobile
This commit is contained in:
parent
9eab5a29d9
commit
0aef70028a
1 changed files with 7 additions and 0 deletions
|
|
@ -120,6 +120,13 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).scroll(function() {
|
||||
if ($(document).scrollLeft() > 0) {
|
||||
localStorage.setItem('sidebar-active', 'false');
|
||||
$(document.body).addClass('sidebar-hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('h1, h2, h3, h4, h5, h6').filter('[id]').each(function() {
|
||||
$(this).html('<a href="#'+$(this).attr('id')+'">' + $(this).text() + '</a>');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue