From 825227474b57c90181e9c1b43da952d01b6c1dc1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 25 Mar 2012 17:37:38 -0700 Subject: [PATCH] add refresh method documentation to js docs to close #2028 and #2795 --- docs/assets/bootstrap.zip | Bin 56863 -> 56863 bytes docs/javascript.html | 8 ++++++++ docs/templates/pages/javascript.mustache | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index f1239927e50a9ef0519535c7bad64a4457d28cc5..e2911bc660ebc25f23f84fd9e31d633f9c509ce9 100644 GIT binary patch delta 464 zcmbQghk5=UW}X0VW)?065SZOFkw=kDbyvQ>`mV_vZwqrFNd%~}slg>C_Hi%)70<8* zi>d9}c>4k;)102kYq=cR)Pbthc5VK`8%R{| zmN&8p(4bkj{F%U(!PRixc0g7G)RleP1tJ19*%)FET!+e?Ks1qQcf4V40lELK5waaX VkzrXq8|o?rKtjL!Y+*un{nY{>Yj@9A!EoGUrUeEtw^%Ib zPy(qtbjSoI^yg5I7|67)oBB+3AkWHz6kND1Gx^(1aVD_$#V7aOVFQWk-SS2gnRUw_ zSp;Yf*KG%gIS^eyk?h+pFq4723%8BYHeads up! Navbar links 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>. +

Methods

+

.scrollspy('refresh')

+

When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:

+
+$('[data-spy="scroll"]').each(function () {
+  var $spy = $(this).scrollspy('refresh')
+});
+

Options

diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index e037dd0243..a5010f2262 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -494,6 +494,14 @@ $('#myModal').on('hidden', function () { {{_i}}Heads up!{{/i}} {{_i}}Navbar links 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>.{{/i}} +

{{_i}}Methods{{/i}}

+

.scrollspy('refresh')

+

{{_i}}When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:{{/i}}

+
+$('[data-spy="scroll"]').each(function () {
+  var $spy = $(this).scrollspy('refresh')
+});
+

{{_i}}Options{{/i}}