Sticky effect on top and bottom of the page

As Noob to Javascript,
I am observing and examining the code, on the js hype files on here (hype forums) and common sense tells me there’s multiple ways about going to do this, but I just don’t know how.
Here goes:
I’d like to apply the sticky effect to multiple elements, but the elements differ from each other, e.g. header and footer with sticky effect.