płynne scrolowanie do góry strony lub elementu wyznaczonego anchorem:
//scroll function $('.scroll-link').click(function(e){ e.preventDefault(); var myLink = $(this).attr('href'); if(myLink.length > 1){ $('html,body').animate({scrollTop: $(this.hash).offset().top}, 1000); } else { $('html,body').animate({scrollTop: 0}, 1000); } });
—
Agnieszka Trefler (Ruda) - freelancer, web developer, specjalistka od WordPressa z Wrocławia. Z pasją budowania stron, blogowania i fotografowania. Twórca Inspiracji fotograficznych.