From: Jacob Thornton Date: Sun, 19 Aug 2012 02:32:50 +0000 (-0700) Subject: add note about .nav X-Git-Tag: v2.1.0~2^2~23^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=937cfa6a88919eaa6bfd3e65405093f9bd46c95d;p=thirdparty%2Fbootstrap.git add note about .nav --- diff --git a/docs/javascript.html b/docs/javascript.html index bc5d606cd4..31ad87edda 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -566,7 +566,7 @@ $('#myModal').on('hidden', function () {

Usage

Via data attributes

-

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.

+

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 scrollspy with the .nav class.

<body data-spy="scroll" data-target=".navbar">...</body>

Via JavaScript

diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index b62bbfc3cb..29cce61e6d 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -496,7 +496,7 @@ $('#myModal').on('hidden', function () {

{{_i}}Usage{{/i}}

{{_i}}Via data attributes{{/i}}

-

{{_i}}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.{{/i}}

+

{{_i}}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 scrollspy with the .nav class.{{/i}}

<body data-spy="scroll" data-target=".navbar">...</body>

{{_i}}Via JavaScript{{/i}}