"anchor test"
Bootstrap 3.3.0 Snippet by nonconforme

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div id="top" class="container"> <div class="row"> <h2>Create your snippet's HTML, CSS and Javascript in the editor tabs</h2> <div style="height:600px"></div> <a href="#" rel="gy_anchor">TOP</a> </div> </div>
$('a[rel="gy_anchor"]').click(function(e) { e.preventDefault(); var target = this.hash; $target = jQuery(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top }, 1500, 'swing', function () { window.location.hash = target; }); });

Related: See More


Questions / Comments: