UNPKG

avvo-styleguide

Version:
19 lines (15 loc) 473 B
/** * PositionSticky * Sticky positioning polyfill * * Forked from https://github.com/katranci/PositionSticky */ const CONFIG = require('./config') const PositionSticky = require('./position-sticky') export function init() { // Feature detect position sticky, if it exists then do nothing if (global.Modernizr.csspositionsticky) return global.$(CONFIG.SELECTOR).each(function () { global.$(this).data('positionSticky', PositionSticky.create(this)) }) }