I can't find an example of what I am looking for but I'm pretty sure I have seen it!

When you scroll down a page the first heading stays fixed on the screen and when the second heading is scrolled too this then stays on the screen until the third heading is reached and so forth.. Can this be done with jQuery?

if H2 is top of view port stay fixed until next H2 is top of view port?