Difference between revisions of "Template:Washington"
Line 275: | Line 275: | ||
<!-- End of CSS --> | <!-- End of CSS --> | ||
<head> | <head> | ||
− | <script | + | <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |
− | + | ||
− | + | <script> | |
+ | $(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; | |
− | + | } | |
− | + | } | |
− | + | }); | |
− | + | }); | |
− | + | </script> | |
− | + | </head> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | }); | + | |
− | + | ||
− | + | ||
− | + | ||
<!-- Start of the template html elements. --> | <!-- Start of the template html elements. --> | ||
<div id ="mainContainer"> | <div id ="mainContainer"> |
Revision as of 05:45, 11 September 2015