Difference between revisions of "Template:Washington"
Line 276: | Line 276: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
$(function() { | $(function() { | ||
− | + | $('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; | |
− | + | } | |
− | + | ||
− | + | ||
− | + | ||
− | $('html, body').animate({ | + | |
− | + | ||
− | }, 1000 | + | |
} | } | ||
− | + | }); | |
}); | }); | ||
Revision as of 02:58, 11 September 2015