jQuery Simple Example
HTML
<script src="//www.addressfinder.co.nz/assets/v2/widget.js"></script>
<a href="#" class="button">123</a>
<div style='height: 1000px;'></div>
<div class="scroll-wrapper">
HI!
</div>
CSS
body {
padding: 5px;
}
label {
font-weight: bold;
}
input[type=text] {
width: 20em
}
p {
margin: 1em 0 0;
}
JavaScript
$(document).ready(function() {
$('.button').on('click', function (e) {
e.preventDefault();
$('html,body').animate({
scrollTop: $('.scroll-wrapper').offset().top - 50
}, 1000);
});
});