Here is the jQuery code, it's the last thing
Here is where I want it to move
But fortunately, do not do anything, someone help me please? Thanks: D
This way works pretty well:
JS:
$(function(){
$('a[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) {
var targetOffset = $target.offset().top;
$('html,body').animate({scrollTop: targetOffset}, 1000);
return false;
}
}
});
HTML:
Link that will take you to the site:
<a id="up" href="#to_up"> UP </a>
And this you put in the place where you want to take you:
<a name="to_up"></a>