Add a 'ui-fixed' class to elements when the page scrolls past them
They see me scrollin...
Try scrolling past the red text or changing the offsetMake elements sticky, or simply appear different after scrolling past a certain point
Remember that this directive
only adds a
ui-scrollfix
class to the element. It is up to you to add the corresponding CSS rules, however it also gives you the ability to add other rules instead if you prefer.
<p ui-scrollfix>They see me scrollin...</p>
You can optionally pass a number to
ui-scrollfix
which would override the detected y-offset of the element. Values can be either absolute
600
or offset from the calculated value -50
or +100
.