diff --git a/docs/_includes/js/affix.html b/docs/_includes/js/affix.html index 4ce51cb34b..56168d6a89 100644 --- a/docs/_includes/js/affix.html +++ b/docs/_includes/js/affix.html @@ -14,8 +14,8 @@

Here's how the affix plugin works:

  1. To start, the plugin adds .affix-top to indicate the element is in its top-most position. At this point no CSS positioning is required.
  2. -
  3. Scrolling past the element you want affixed should trigger the actual affixing. This is where .affix replaces .affix-top and sets position: fixed; (provided by Bootstrap's code CSS).
  4. -
  5. If a bottom offset is defined, scrolling past that should replace .affix with .affix-bottom. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add position: absolute; when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.
  6. +
  7. Scrolling past the element you want affixed should trigger the actual affixing. This is where .affix replaces .affix-top and sets position: fixed; (provided by Bootstrap's CSS).
  8. +
  9. If a bottom offset is defined, scrolling past it should replace .affix with .affix-bottom. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add position: absolute; when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.

Follow the above steps to set your CSS for either of the usage options below.

@@ -31,14 +31,14 @@

Via JavaScript

Call the affix plugin via JavaScript:

{% highlight js %} - $('#my-affix').affix({ - offset: { - top: 100 - , bottom: function () { - return (this.bottom = $('.footer').outerHeight(true)) - } +$('#myAffix').affix({ + offset: { + top: 100, + bottom: function () { + return (this.bottom = $('.footer').outerHeight(true)) } - }) + } +}) {% endhighlight %} @@ -75,7 +75,7 @@

Events

-

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

+

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

diff --git a/docs/_includes/js/alerts.html b/docs/_includes/js/alerts.html index e9cb8c871b..2f6b33368a 100644 --- a/docs/_includes/js/alerts.html +++ b/docs/_includes/js/alerts.html @@ -3,14 +3,12 @@

Example alerts

Add dismiss functionality to all alert messages with this plugin.

-
+
-
-
{% highlight js %} -$('#my-alert').on('closed.bs.alert', function () { +$('#myAlert').on('closed.bs.alert', function () { // do something… }) {% endhighlight %} diff --git a/docs/assets/css/src/docs.css b/docs/assets/css/src/docs.css index 54cd991e35..142519bd5f 100644 --- a/docs/assets/css/src/docs.css +++ b/docs/assets/css/src/docs.css @@ -906,6 +906,9 @@ h1[id] { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } + .bs-example-standalone { + border-radius: 4px; + } } /* Undo width of container */