1
0
mirror of https://github.com/actix/actix-website synced 2024-11-27 18:12:57 +01:00

Scroll to active showcase on load

This commit is contained in:
Armin Ronacher 2018-05-26 14:31:03 +02:00
parent f657be7ae5
commit cc236920f3

View File

@ -15,6 +15,9 @@
var active = $(window.location.hash); var active = $(window.location.hash);
if (active.is('div.actix-feature')) { if (active.is('div.actix-feature')) {
activateFeature(window.location.hash); activateFeature(window.location.hash);
$('html, body').animate({
scrollTop: $('.actix-showcase').offset().top
}, 1000);
} else { } else {
activateFeature('#' + $('div.actix-feature')[0].id); activateFeature('#' + $('div.actix-feature')[0].id);
} }