Difference between revisions of "Template:Washington"
Line 278: | Line 278: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | + | $('a[href*=#]:not([href=#])').click(function() { | |
− | + | 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 | |
− | + | }, 1000); | |
− | + | return false; | |
− | + | } | |
− | + | } | |
− | + | }); | |
− | + | ||
</script> | </script> | ||
</head> | </head> |
Revision as of 18:56, 11 September 2015