1~~NOTOC~~
2====== Affix ======
3
4The affix plugin toggles ''position: fixed;'' on and off, emulating the effect found with ''position: sticky;''.
5
6==== Sample ====
7
8<code html5>
9<affix offset-top="50" position-top="100" position-right="20">
10<panel title="Affix">
11Scroll the page!
12</panel>
13</affix>
14</code>
15
16<affix offset-top="50" position-top="100" position-right="20">
17<panel title="Affix">
18Scroll the page!
19</panel>
20</affix>
21
22==== Options ====
23
24^ Attribute            ^ Default Value ^ Description
25| ''offset-top''       | optional | Offset from top of target (in ''px|em|%'') |
26| ''offset-bottom''    | optional | Offset from bottom of target (in ''px|em|%'') |
27| ''position-top''     | optional | Top position of Affix element (in ''px|em|%'') |
28| ''position-bottom''  | optional | Bottom position of Affix element (in ''px|em|%'') |
29| ''position-left''    | optional | Left position of Affix element (in ''px|em|%'') |
30| ''position-right''   | optional | Right position of Affix element (in ''px|em|%'') |
31| ''target''           | Window Document | Target element (eg. ''#dokuwiki__site'') |
32