From 7da0e5cc0c01ded91544ecc2bca0c171d3176cb5 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 18 Sep 2011 08:35:34 +0800 Subject: [PATCH] Documentation typo/error on scrollSpy. --- docs/javascript.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/javascript.html b/docs/javascript.html index ca4f941a15..f8ef930c6e 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -292,21 +292,21 @@ $('#my-modal').bind('hidden', function () {

Using boostrap-scrollspy.js

-
$('#topbar').dropdown()
+
$('#topbar').scrollSpy()

Markup

To easily add scrollspy behavior to your nav, just add the data-scrollspy attribute to the .topbar.

<div class="topbar" data-scrollspy="scrollspy" >...</div>

Methods

-

$().scrollspy()

+

$().scrollSpy()

Auto activates navigation buttons by users scroll position.

$('body > .topbar').scrollSpy()

Notice Topbar anchor tags must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the dom like <div id="home"></div>.

-

.scrollspy('refresh')

+

.scrollSpy('refresh')

The scrollspy caches nav buttons and section coordinates for performance. If you need to update this cache (likely if you have dynamic content) just call this refresh method. If you used the data attribute to define your scrollspy, just call refresh on the body.

-
$('body').scrollspy('refresh')
+
$('body').scrollSpy('refresh')

Demo

Checkout the the topbar navigation on this page.