diff --git a/docs/javascript.html b/docs/javascript.html index fe7f750c0c..2d01af561f 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -571,12 +571,12 @@ $('#myModal').on('hidden', function () {
To easily add scrollspy behavior to your topbar navigation, just add data-spy="scroll"
to the element you want to spy on (most typically this would be the body) and data-target=".navbar"
to select which nav to use. You'll need to use scrollspy with a .nav
component.
To easily add scrollspy behavior to your topbar navigation, just add data-spy="scroll"
to the element you want to spy on (most typically this would be the body) and data-target=".navbar"
to select which nav to use. You'll want to use scrollspy with a .nav
component.
<body data-spy="scroll" data-target=".navbar">...</body>
Call the scrollspy via JavaScript:
-$('body').scrollspy(options)+
$('#navbar').scrollspy()
.nav li > a
inside this target.)