Fixed affix.js for small vertical displays

Also added documentation