diff --git a/docs/_includes/js/affix.html b/docs/_includes/js/affix.html index c94efc03fbe4234d5fb698d7b668a7b54b024f75..bdd896b82f6ce73e368d648ddd752654173eff0a 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> diff --git a/docs/_includes/nav/javascript.html b/docs/_includes/nav/javascript.html index eba53771b0e91d1ab3af2ea02703fa0ea93a9ba7..de983424854516af3598f3f82948000c1fb7d4b3 100644 --- a/docs/_includes/nav/javascript.html +++ b/docs/_includes/nav/javascript.html @@ -117,6 +117,7 @@ <li><a href="#affix-examples">Examples</a></li> <li><a href="#affix-usage">Usage</a></li> <li><a href="#affix-options">Options</a></li> + <li><a href="#affix-methods">Methods</a></li> <li><a href="#affix-events">Events</a></li> </ul> </li>