keeps url clean when navigating through page

Don Graham
2015-05-04T18:49:34Z

clean-links.js

| $('a[href*=#]:not([href=#])').click(function(e) {
| e.preventDefault();
| if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
| var target = $(this.hash);
| target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
| if (target.length) {
| $('html,body').animate({
| scrollTop: target.offset().top - 55
| }, 1000);
| //Grab our current Url
| var url = window.location.toString();
| url = url.split("#")[0];
| return false;
| }
| }
| });