Skip to content

Commit

Permalink
Scroll to url anchor when present on docs and recipes pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Westwooo committed Sep 26, 2024
1 parent f80f284 commit 8da47e4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
= Couchbase Shell Documentation =
(c) Copyright 2024, All Rights Reserved

++++
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
// Handler for .ready() called.
var hash = $(location).attr('hash');
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 'slow');
});
</script>
++++

:sectnums:
:toclevels: 3

Expand Down
13 changes: 13 additions & 0 deletions docs/recipes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
= Recipes

++++
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
// Handler for .ready() called.
var hash = $(location).attr('hash');
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 'slow');
});
</script>
++++

:sectnums:

Welcome to the recipes section of the Couchbase Shell `cbsh` documentation.
Expand Down

0 comments on commit 8da47e4

Please sign in to comment.