URLにつけた#exampleに応じてスクロールする

<script type="text/javascript">
$(window).load(function() {
	var ahash = location.hash;
	var gotoNum = $(ahash).offset().top;
	$('html,body').animate({ scrollTop: gotoNum }, 'slow');
	return false;
});
</script>

投稿者:

ayako0802

フロントエンドエンジニア