fixed scrollTop error
This commit is contained in:
parent
e267e4e7f9
commit
17dd654f02
1197
docs/css/styles.css
1197
docs/css/styles.css
File diff suppressed because it is too large
Load Diff
|
@ -31,19 +31,21 @@
|
||||||
|
|
||||||
/* persist navigation scroll point */
|
/* persist navigation scroll point */
|
||||||
(function () {
|
(function () {
|
||||||
var patternsNav = document.getElementById('patterns-nav')
|
window.onunload = function () {
|
||||||
if (patternsNav) {
|
var patternsNav = document.getElementById('patterns-nav')
|
||||||
var scrollPoint = patternsNav.scrollTop
|
if (patternsNav) {
|
||||||
window.onunload = function () {
|
var scrollPoint = patternsNav.scrollTop
|
||||||
localStorage.setItem('scrollPoint', scrollPoint)
|
localStorage.setItem('scrollPoint', scrollPoint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', function () {
|
window.addEventListener('DOMContentLoaded', function () {
|
||||||
if (window.location.href.indexOf('patterns/') !== -1) {
|
if (document.getElementById('patterns-nav')) {
|
||||||
scrollPoint = parseInt(localStorage.getItem('scrollPoint'))
|
if (window.location.href.indexOf('patterns/') !== -1) {
|
||||||
} else {
|
document.getElementById('patterns-nav').scrollTop = parseInt(localStorage.getItem('scrollPoint'))
|
||||||
scrollPoint = 0
|
} else {
|
||||||
|
document.getElementById('patterns-nav').scrollTop = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}());
|
}());
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -31,19 +31,21 @@
|
||||||
|
|
||||||
/* persist navigation scroll point */
|
/* persist navigation scroll point */
|
||||||
(function () {
|
(function () {
|
||||||
var patternsNav = document.getElementById('patterns-nav')
|
window.onunload = function () {
|
||||||
if (patternsNav) {
|
var patternsNav = document.getElementById('patterns-nav')
|
||||||
var scrollPoint = patternsNav.scrollTop
|
if (patternsNav) {
|
||||||
window.onunload = function () {
|
var scrollPoint = patternsNav.scrollTop
|
||||||
localStorage.setItem('scrollPoint', scrollPoint)
|
localStorage.setItem('scrollPoint', scrollPoint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', function () {
|
window.addEventListener('DOMContentLoaded', function () {
|
||||||
if (window.location.href.indexOf('patterns/') !== -1) {
|
if (document.getElementById('patterns-nav')) {
|
||||||
scrollPoint = parseInt(localStorage.getItem('scrollPoint'))
|
if (window.location.href.indexOf('patterns/') !== -1) {
|
||||||
} else {
|
document.getElementById('patterns-nav').scrollTop = parseInt(localStorage.getItem('scrollPoint'))
|
||||||
scrollPoint = 0
|
} else {
|
||||||
|
document.getElementById('patterns-nav').scrollTop = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user