1234567891011121314151617181920212223242526272829 |
- var amountScrolled = 300;
- $(document).ready( function(){
- $(window).scroll(function() {
- if ( $(window).scrollTop() > amountScrolled ) {
- $('#botom-corner').fadeIn('slow');
- } else {
- $('#botom-corner').fadeOut('slow');
- }
- });
- } );
- $(function(){
- $('#go-top').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) {
- var targetOffset = $target.offset().top;
- $('html,body').animate({scrollTop: targetOffset}, 1000);
- return false;
- }
- }
- });
- });
|