I am trying to create an anchor link that when clicked will scroll down the page.
the script:
<script type="text/javascript">
$(document).ready(function() {
function scrollWin(){
$('html,body').animate({
scrollTop: $("#scrollToHere").offset().top
}, 800);
}
});
</script>
the link:
<a class="icon_button" href="#" onclick="scrollWin();" ><i class="icon-chevron-down "></i> </a>
and then the div to be scrolled to:
<div id="scrollToHere">
Scroll to here
</div>
What am I missing?
$(document).ready(function() {
wrapper