diff --git a/docs/javascript.html b/docs/javascript.html index fcfc12a736..8c172b809a 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -670,7 +670,7 @@ $('#myDropdown').on('show.bs.dropdown', function () {

Usage

Requires relative positioning

-

No matter the implementation method, scrollspy requires the use of position: absolute; on the element you're spying on. In most cases this is the <body>.

+

No matter the implementation method, scrollspy requires the use of position: relative; on the element you're spying on. In most cases this is the <body>.

Via data attributes

To easily add scrollspy behavior to your topbar navigation, add data-spy="scroll" to the element you want to spy on (most typically this would be the <body>). Then add the data-target attribute with the ID or class of the parent element of any Bootstrap .nav component.