This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision |
wiki:plugin:bootswrapper:affix [2015/08/01 00:03] – Giuseppe Di Terlizzi | wiki:plugin:bootswrapper:affix [2016/02/26 11:39] (current) – [Sample] Giuseppe Di Terlizzi |
---|
| ~~NOTOC~~ |
====== Affix ====== | ====== Affix ====== |
| |
{{page>:wiki:plugin:bootswrapper:menu&inline&nofooter}} | The affix plugin toggles ''position: fixed;'' on and off, emulating the effect found with ''position: sticky;''. |
| |
==== Sample ==== | ==== Sample ==== |
| |
<code html> | <code html5> |
<affix offset-top="10"> | <affix offset-top="50" position-top="100" position-right="20"> |
<panel title="Affix"> | <panel title="Affix"> |
This is a sample | Scroll the page! |
</panel> | </panel> |
</affix> | </affix> |
</code> | </code> |
| |
\\ | <affix offset-top="50" position-top="100" position-right="20"> |
| |
<affix offset-top="10"> | |
<panel title="Affix"> | <panel title="Affix"> |
This is a sample | Scroll the page! |
</panel> | </panel> |
</affix> | </affix> |
| |
==== Attributes ==== | ==== Options ==== |
| |
^ Attribute ^ Default Value ^ Description | ^ Attribute ^ Default Value ^ Description |
| ''offset-top'' | optional | Offset from top of target | | | ''offset-top'' | optional | Offset from top of target (in ''px|em|%'') | |
| ''offset-bottom'' | optional | Offset from bottom of target | | | ''offset-bottom'' | optional | Offset from bottom of target (in ''px|em|%'') | |
| ''target'' | Window Document | Target element (eg. ''#dokuwiki__site'') | | | ''position-top'' | optional | Top position of Affix element (in ''px|em|%'') | |
| | ''position-bottom'' | optional | Bottom position of Affix element (in ''px|em|%'') | |
| | ''position-left'' | optional | Left position of Affix element (in ''px|em|%'') | |
| | ''position-right'' | optional | Right position of Affix element (in ''px|em|%'') | |
| | ''target'' | Window Document | Target element (eg. ''#dokuwiki__site'') | |
| |