Skip to content

Commit 93611f1

Browse files
committed
Fix scrollTo from introduction
1 parent 921c1d4 commit 93611f1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

js/app.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ function safeLocalStorageSetItem(key, value) {
2727
}
2828
safeLocalStorageSetItem("visited", "1");
2929

30+
/*
31+
* Go to url hash from intro section
32+
*/
33+
if (location.href.indexOf("#debugger") != -1) {
34+
parent.location.hash = ''
35+
scrollTo($('#debugger'));
36+
}
37+
38+
if (location.href.indexOf("#libraries") != -1) {
39+
parent.location.hash = ''
40+
scrollTo($('#libraries'));
41+
}
42+
3043
/*
3144
* Show icon
3245
*/
@@ -78,15 +91,12 @@ $('.accordion').accordion({
7891
* Scroll to section
7992
*/
8093
$('a[href^="#"].scrollto').on('click', function(event) {
81-
event.preventDefault();
8294
var target = $( $(this).attr('href') );
8395

8496
if( target.length ) {
8597
event.preventDefault();
8698
scrollTo(target);
8799
}
88-
89-
return false;
90100
});
91101

92102
$(window).on('scroll', function () {

0 commit comments

Comments
 (0)