Affix.js is simple function written in Pure JS to allow an element to become fixed to an area on the page
Affix.js doesnt depends on any library, it's written purely in JS
To fire the plugin on an element you want to Affix call Affix function and pass an object of
- element(required) : element which has to be Affixed.
<script type="text/javascript" src="affix.js"></script>
<script type="text/javascript">
Affix({element:"nav#menu"});
Affix({element:"div#footer"});
</script>