UNPKG

ng-stickyfill

Version:

An Angular directive for easy using stickyfill, a polyfill allowing to use position:sticky on browsers that doesn't support that

15 lines (14 loc) 326 B
angular.module('stickyfill', []) .directive('stickyfill', [function() { return { restrict: 'AEC', link: function(scope, element) { element.css({ position: '-webkit-sticky', position: 'sticky', top: 0 }); Stickyfill.add(element[0]); } }; }]);