diff --git a/docs/_includes/js/affix.html b/docs/_includes/js/affix.html index c94efc03fb..bdd896b82f 100644 --- a/docs/_includes/js/affix.html +++ b/docs/_includes/js/affix.html @@ -74,6 +74,19 @@ $('#myAffix').affix({ +

Methods

+ +

.affix(options)

+

Activates your content as affixed content. Accepts an optional options object.

+{% highlight js %} +$('#myAffix').affix({ + offset: 15 +}) +{% endhighlight %} + +

.affix('checkPosition')

+

Recalculates the state of the affix based on the dimensions, position, and scroll position of the relevant elements. The .affix, .affix-top, and .affix-bottom 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.

+ {% highlight js %}$('#myAffix').affix('checkPosition'){% endhighlight %}

Events

Bootstrap's affix plugin exposes a few events for hooking into affix functionality.

diff --git a/docs/_includes/nav/javascript.html b/docs/_includes/nav/javascript.html index eba53771b0..de98342485 100644 --- a/docs/_includes/nav/javascript.html +++ b/docs/_includes/nav/javascript.html @@ -117,6 +117,7 @@
  • Examples
  • Usage
  • Options
  • +
  • Methods
  • Events