]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
add refresh method documentation to js docs to close #2028 and #2795
authorMark Otto <markotto@twitter.com>
Mon, 26 Mar 2012 00:37:38 +0000 (17:37 -0700)
committerMark Otto <markotto@twitter.com>
Mon, 26 Mar 2012 00:37:38 +0000 (17:37 -0700)
docs/assets/bootstrap.zip
docs/javascript.html
docs/templates/pages/javascript.mustache

index f1239927e50a9ef0519535c7bad64a4457d28cc5..e2911bc660ebc25f23f84fd9e31d633f9c509ce9 100644 (file)
Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ
index 3cba210a1ce7aeab086b04a49cccf2f3cff4f713..70646afdbb339c13e67efe7e7722e4b5bd0d7501 100644 (file)
@@ -571,6 +571,14 @@ $('#myModal').on('hidden', function () {
             <strong>Heads up!</strong>
             Navbar links must have resolvable id targets. For example, a <code>&lt;a href="#home"&gt;home&lt;/a&gt;</code> must correspond to something in the dom like <code>&lt;div id="home"&gt;&lt;/div&gt;</code>.
           </div>
+          <h3>Methods</h3>
+          <h4>.scrollspy('refresh')</h4>
+          <p>When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:</p>
+<pre class="prettyprint linenums">
+$('[data-spy="scroll"]').each(function () {
+  var $spy = $(this).scrollspy('refresh')
+});
+</pre>
           <h3>Options</h3>
           <table class="table table-bordered table-striped">
             <thead>
index e037dd0243c7252b26c2d70e602201777f9d4ccb..a5010f2262c35cfacdb5f2dcf989cb9fdf43f4b0 100644 (file)
@@ -494,6 +494,14 @@ $('#myModal').on('hidden', function () {
             <strong>{{_i}}Heads up!{{/i}}</strong>
             {{_i}}Navbar links must have resolvable id targets. For example, a <code>&lt;a href="#home"&gt;home&lt;/a&gt;</code> must correspond to something in the dom like <code>&lt;div id="home"&gt;&lt;/div&gt;</code>.{{/i}}
           </div>
+          <h3>{{_i}}Methods{{/i}}</h3>
+          <h4>.scrollspy('refresh')</h4>
+          <p>{{_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}}</p>
+<pre class="prettyprint linenums">
+$('[data-spy="scroll"]').each(function () {
+  var $spy = $(this).scrollspy('refresh')
+});
+</pre>
           <h3>{{_i}}Options{{/i}}</h3>
           <table class="table table-bordered table-striped">
             <thead>