1.2.3 • Published 4 years ago
sv-sticky-form v1.2.3
Savvy Sticky Form
Lightweight, responsive helper class for sticking lead forms (or other elements) in place on a page. Instead of being fixed in place, elements are translated along the X axis so that they retain their ability to react to layout as the page resizes. The scroll listener is debounced by default for performance.
How To Use
Load
sv-sticky-form-min.js
after the body tag in your site. Make sure jQuery is included before this script.Instantiate
SvStickyForm
with the selector of the element to make sticky. For example:
const stickyForm = new SvStickyForm({
selector: '.element-css-selector'
});
See JSDOC style comments in ./src/savvy-sticky-form.js
for a list of addiional configs.