karnov.club/js/animate.js

24 lines
701 B
JavaScript
Raw Normal View History

2016-03-02 06:42:58 +00:00
$(function(){
$("#landing-subtyped").typed({
strings: ["<span class='accent'>tinker</span>.",
"<span class='accent'>share what I know</span>.",
"<span class='accent'>learn new things</span>.",
"<span class='accent'>code</span>.",
"<span class='accent'>communicate</span>."],
typeSpeed: 20,
loop: true,
backDelay: 2000,
backSpeed: 0,
cursorChar: "&block;"
});
2015-12-25 01:47:49 +00:00
});
2015-12-24 07:36:59 +00:00
2016-03-02 06:42:58 +00:00
$('a').on('click', function(event) {
var target = $($(this).attr('href'));
if( target.length ) {
event.preventDefault();
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
2015-12-25 01:47:49 +00:00
}
});