Difference between revisions of "Template:Washington"
Line 270: | Line 270: | ||
padding-top: 5px; | padding-top: 5px; | ||
} | } | ||
+ | |||
</style> | </style> | ||
<!-- End of CSS --> | <!-- End of CSS --> | ||
+ | <script type="text/javascript"> | ||
+ | (function($){ | ||
+ | |||
+ | var jump=function(e) | ||
+ | { | ||
+ | if (e){ | ||
+ | e.preventDefault(); | ||
+ | var target = $(this).attr("href"); | ||
+ | }else{ | ||
+ | var target = location.hash; | ||
+ | } | ||
+ | |||
+ | $('html,body').animate( | ||
+ | { | ||
+ | scrollTop: $(target).offset().top | ||
+ | },1000,function() | ||
+ | { | ||
+ | location.hash = target; | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | $('html, body').hide() | ||
+ | |||
+ | $(document).ready(function() | ||
+ | { | ||
+ | $('a[href^=#]').bind("click", jump); | ||
+ | |||
+ | if (location.hash){ | ||
+ | setTimeout(function(){ | ||
+ | $('html, body').scrollTop(0).show() | ||
+ | jump() | ||
+ | }, 0); | ||
+ | }else{ | ||
+ | $('html, body').show() | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | })(jQuery) | ||
+ | |||
+ | </script> | ||
+ | |||
<!-- Start of the template html elements. --> | <!-- Start of the template html elements. --> | ||
<div id ="mainContainer"> | <div id ="mainContainer"> |
Revision as of 23:10, 10 September 2015