diff --git a/docs/_includes/js/affix.html b/docs/_includes/js/affix.html index 4ce51cb34bd2f2683639b343e8ffd229d58b83b0..56168d6a896611aa78268589d1885a17a3ae58ee 100644 --- a/docs/_includes/js/affix.html +++ b/docs/_includes/js/affix.html @@ -14,8 +14,8 @@ <p>Here's how the affix plugin works:</p> <ol> <li>To start, the plugin adds <code>.affix-top</code> to indicate the element is in its top-most position. At this point no CSS positioning is required.</li> - <li>Scrolling past the element you want affixed should trigger the actual affixing. This is where <code>.affix</code> replaces <code>.affix-top</code> and sets <code>position: fixed;</code> (provided by Bootstrap's code CSS).</li> - <li>If a bottom offset is defined, scrolling past that should replace <code>.affix</code> with <code>.affix-bottom</code>. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add <code>position: absolute;</code> when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.</li> + <li>Scrolling past the element you want affixed should trigger the actual affixing. This is where <code>.affix</code> replaces <code>.affix-top</code> and sets <code>position: fixed;</code> (provided by Bootstrap's CSS).</li> + <li>If a bottom offset is defined, scrolling past it should replace <code>.affix</code> with <code>.affix-bottom</code>. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add <code>position: absolute;</code> when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.</li> </ol> <p>Follow the above steps to set your CSS for either of the usage options below.</p> @@ -31,14 +31,14 @@ <h3>Via JavaScript</h3> <p>Call the affix plugin via JavaScript:</p> {% 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 @@ <h3>Events</h3> - <p>Bootstrap's affix class exposes a few events for hooking into affix functionality.</p> + <p>Bootstrap's affix plugin exposes a few events for hooking into affix functionality.</p> <div class="table-responsive"> <table class="table table-bordered table-striped"> <thead> diff --git a/docs/_includes/js/alerts.html b/docs/_includes/js/alerts.html index e9cb8c871b22b2c22ae40693dca411a4aac864db..2f6b33368a69f1371763acb05e516539ac62afb0 100644 --- a/docs/_includes/js/alerts.html +++ b/docs/_includes/js/alerts.html @@ -3,14 +3,12 @@ <h2 id="alerts-examples">Example alerts</h2> <p>Add dismiss functionality to all alert messages with this plugin.</p> - <div class="bs-example"> + <div class="bs-example bs-example-standalone"> <div class="alert alert-warning alert-dismissible fade in" role="alert"> <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. </div> - </div><!-- /example --> - <div class="bs-example"> <div class="alert alert-danger alert-dismissible fade in" role="alert"> <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4>Oh snap! You got an error!</h4> @@ -24,21 +22,25 @@ <h2 id="alerts-usage">Usage</h2> - <p>Enable dismissal of an alert via JavaScript:</p> - {% highlight js %}$(".alert").alert(){% endhighlight %} - <h3>Markup</h3> <p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.</p> - {% highlight html %}<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>{% endhighlight %} + +{% highlight html %} +<button type="button" class="close" data-dismiss="alert"> + <span aria-hidden="true">×</span> + <span class="sr-only">Close</span> +</button> +{% endhighlight %} + + <p>To have your alerts use animation when closing, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p> <h3>Methods</h3> <h4>$().alert()</h4> - <p>Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p> + <p>Makes an alert listen for click events on descendant elements which have the <code>data-dismiss="alert"</code> attribute. (Not necessary when using the data-api's auto-initialization.)</p> - <h4>.alert('close')</h4> + <h4>$().alert('close')</h4> <p>Closes an alert.</p> - {% highlight js %}$(".alert").alert('close'){% endhighlight %} <h3>Events</h3> @@ -64,7 +66,7 @@ </table> </div><!-- /.table-responsive --> {% 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 54cd991e356269d1dac020fd6df433cff932fcf9..142519bd5fc0704ad5f73483e47dfdecd1671806 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 */