aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes/js/affix.html
diff options
context:
space:
mode:
authorJames Friend <[email protected]>2014-08-28 09:32:08 +0800
committerJames Friend <[email protected]>2014-08-28 09:32:08 +0800
commit9aeaf19b1dca68ee71e916ae415a0c270a47d301 (patch)
treebc8385acb8ec7a46bba03ff2ef7e4283cd9f1146 /docs/_includes/js/affix.html
parente7991a9a1e2f474c8f1d8a2e0ed113816f1c5e82 (diff)
parent35f09315ed543a0479719afa2143240952c215db (diff)
downloadbootstrap-9aeaf19b1dca68ee71e916ae415a0c270a47d301.tar.xz
bootstrap-9aeaf19b1dca68ee71e916ae415a0c270a47d301.zip
Merge remote-tracking branch 'upstream/master' into node-requirable
Conflicts: Gruntfile.js
Diffstat (limited to 'docs/_includes/js/affix.html')
-rw-r--r--docs/_includes/js/affix.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/_includes/js/affix.html b/docs/_includes/js/affix.html
index 4ce51cb34..56168d6a8 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>