22 |

All internal links would scroll Smoothly.

23 | 24 |

Usage :

25 | 26 |

Include the js file

27 | 28 |
<script type="text/javascript" src="smoothScroll.js"></script>
29 | 
30 | 31 |

Add this script after the body load. Ideally one may add this just before the closing of body tag.

32 | 33 |
<script type="text/javascript">
34 |         smooth_scroll.init();
35 | </script>
36 | 
37 | 38 |

If there is a fixed header, pass the id of fixed header as config.

39 | 40 |
<script type="text/javascript">
41 |         smooth_scroll.init({
42 |             header_id : "page-header"
43 |         });
44 | </script>
45 | 
46 | 
47 | 
48 | 49 |

If there are links that should be ignored. Pass an array to ignore those links. Example

50 | 51 |
<script type="text/javascript">
52 |         smooth_scroll.init({
53 |             header_id : "page-header",
54 |             ignore_links: ["page-header"]
55 |         });
56 | </script>
57 | 
58 | 
59 | 
60 | 61 |

Without Smooth Scroll 62 | alt text

63 | 64 |

With Smooth Scroll 65 | alt text

66 | 67 | 72 | 73 |