diff options
| author | Chris Rebert <[email protected]> | 2015-05-02 13:01:55 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2015-05-02 13:02:48 -0700 |
| commit | 85235c55acffd1f3f2d2cdd0414828b21aa070b7 (patch) | |
| tree | 10445c6d81ed9a3fc1fc0bbe68e9d83b0d1565e9 /docs/_includes/js | |
| parent | 1c7e7fdbef80547ad6a8e4a5d1f3caf7c7681c4c (diff) | |
| download | bootstrap-85235c55acffd1f3f2d2cdd0414828b21aa070b7.tar.xz bootstrap-85235c55acffd1f3f2d2cdd0414828b21aa070b7.zip | |
Document Affix plugin's `checkPosition` method
Fixes #16361
Refs #16356
[skip sauce]
Diffstat (limited to 'docs/_includes/js')
| -rw-r--r-- | docs/_includes/js/affix.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/_includes/js/affix.html b/docs/_includes/js/affix.html index c94efc03f..bdd896b82 100644 --- a/docs/_includes/js/affix.html +++ b/docs/_includes/js/affix.html @@ -74,6 +74,19 @@ $('#myAffix').affix({ </table> </div><!-- /.table-responsive --> + <h3 id="affix-methods">Methods</h3> + + <h4><code>.affix(options)</code></h4> + <p>Activates your content as affixed content. Accepts an optional options <code>object</code>.</p> +{% highlight js %} +$('#myAffix').affix({ + offset: 15 +}) +{% endhighlight %} + + <h4><code>.affix('checkPosition')</code></h4> + <p>Recalculates the state of the affix based on the dimensions, position, and scroll position of the relevant elements. The <code>.affix</code>, <code>.affix-top</code>, and <code>.affix-bottom</code> classes are added to or removed from the affixed content according to the new state. This method needs to be called whenever the dimensions of the affixed content or the target element are changed, to ensure correct positioning of the affixed content.</p> + {% highlight js %}$('#myAffix').affix('checkPosition'){% endhighlight %} <h3 id="affix-events">Events</h3> <p>Bootstrap's affix plugin exposes a few events for hooking into affix functionality.</p> |
