angular-sticky

Name Modified Size
README.md3 years ago1.18 KB
angular-sticky.js3 years ago3.12 KB
angular-sticky.min.js3 years ago1.12 KB
demo.html3 years ago4.16 KB

Angular Sticky

Angular Sticky is an AngularJS directive that gives you the ability to make any element on your page always stay visible.

Usage

To use Angular Sticky, add the script to the head of your document.

<head>
    <script src="angular-sticky.js"></script>
</head>

Next, add the sticky directive to your angular app.

<script>
angular.module('demo', ['sticky'])
</script>

Finally, add a sticky attribute to an element.

<div ng-app="demo">
    <p sticky sticky-top="48" sticky-top="48" sticky-media="(min-width:640px)">This sticks to the top of the page.</p>
</div>

Options

Demo

See a sticky demonstration leveraging all of the available options.


The documented script is 3.11KB, and the compressed script is 572 bytes.