Enable element floating on the screen when scrolling the window.
Please see the floater sidebar.
Enable floater via JavaScript:
$("#element").floater(options);
Options should be passed via JavaScript.
Name | type | default | description |
---|---|---|---|
after | string | null | Set the floater element will floater after which element. |
margin | number | 0 | Set the margin of the float element. |
collapse | boolean | false | In default, floater will create an empty element to replace the space of original element's space to avoid the layout collapsed. Set true let floater no create one. |
$("#sidebar").floater({ after: "#navbar", margin: 20, collapse: true });
None.