toolbarFix
you can fix the div in anywhere
how to use?
toolbarfix depends on jQuery. Include them both in end of your HTML code:
<script type="text/javascript" src="../dist/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="../dist/toolbarFix.min.js"></script>
html code:
//this is tool bar <div id="toolbar" class="selctor" style="position:fixed"> <a href=""></a> <a href=""></a> <a href=""></a> <a href=""></a> </div> //Anchor point corresponding positioning module <div class="section">111</div> <div class="section">222</div> <div class="section">333</div> <div class="section">444</div>
js init:
$("#toolbar").fixed({ position:444,//Offset value to the scroll bar to scroll to what position offset:50,//Initial an offset value relative to the top selector:"a",//The anchor section:".section",//Anchor point corresponding positioning module activeClass:"active" //active class })
bower install
bower install toolbar-fix