Difference between revisions of "Template:Washington"
Line 277: | Line 277: | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | + | ||
− | + | $(document).ready(function() { | |
− | + | $('a[href*="#"]').click(function() { | |
− | + | if (location.pathname == this.pathname && location.host == this.host) { | |
− | + | var target = $(this.hash); | |
− | + | target = target.size() && target || $("[name=" + this.hash.slice(1) +']'); | |
− | + | if (target.size()) { | |
− | + | target.ScrollTo(400); | |
− | + | return false; | |
− | + | } | |
− | + | }; | |
− | + | }); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
}); | }); | ||
Revision as of 05:19, 11 September 2015