Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.
Adam Rahwane edited this page Aug 7, 2018 · 3 revisions

StickyBits API

Stickbits provides an open API for engineers to manage the state of Stickybits items.


  • Stickybits (constructor function)
    • version string
    • userAgent string
    • props {object}
      • target DOM element selector
      • noStyles boolean
      • offset number
      • parentClass string
      • scrollEl window || DOM element selector
      • stickyClass string
      • stuckClass string
      • useStickyClasses boolean
      • verticalPosition string
      • positionVal computed string
    • els [array]
    • instances [array]
      • {object}
        • el DOM node
        • parent parent
        • props {object}
          • target DOM element selector
          • noStyles boolean
          • offset number
          • parentClass string
          • scrollEl window || DOM element selector
          • stickyClass string
          • stuckClass string
          • useStickyClasses boolean
          • verticalPosition string
          • positionVal computed string
          • state string
          • offset number
          • stickyStart number
          • stop number
    • .definePosition function
    • .addInstance function
    • .getClosestParent function
    • .computeScrollOffsets function
    • .toggleClasses function
    • .removeClass function
    • .removeInstance function
    • .cleanup function
Clone this wiki locally