I wonder if it's possible to scroll down after 6 seconds to an anchor?
I found this script where it scrolls down a couple of pixels but it's not completely what I'm looking for.
<script type='text/javascript'>
setTimeout("window.scrollBy(0,270);",6000);
</script>
Also how can i make it scroll down smoothly? I found this but how do i combine it with the other script?
function scrollToAnchor(aid) {
var aTag = $("a[name='" + aid + "']");
$('html,body').animate({scrollTop: aTag.offset().top},'slow');
}
$("#link").click(function() {
scrollToAnchor('id3');
});
I'm not very familiar with JS so I would really appreciate some help :)
the site I'm working is: kip.mascomm.be
UPDATE:
I got the first part to work, thanks to Seth, but can someone please give me a code to make the performance smooth:
var delay = 1000 * 10;
setTimeout(function() {
location.hash = "#kippenkramen";
}, delay);