minor renovations, beautify round 2 (final)

This commit is contained in:
Ilya Kantor 2015-03-12 10:26:02 +03:00
parent fad6615c42
commit 8410ce6421
212 changed files with 1981 additions and 1717 deletions

View file

@ -47,7 +47,7 @@ window.onscroll = function() {
var pageY = window.pageYOffset || document.documentElement.scrollTop;
var innerHeight = document.documentElement.clientHeight;
switch(updownElem.className) {
switch (updownElem.className) {
case '':
if (pageY > innerHeight) {
updownElem.className = 'up';
@ -77,7 +77,7 @@ var pageYLabel = 0;
updownElem.onclick = function() {
var pageY = window.pageYOffset || document.documentElement.scrollTop;
switch(this.className) {
switch (this.className) {
case 'up':
pageYLabel = pageY;
window.scrollTo(0, 0);

View file

@ -3,7 +3,7 @@
Она должна срабатывать не только при прокрутке, но и при загрузке. Вполне достаточно для этого -- указать ее вызов в скрипте под страницей, вот так:
```js
... страница ...
...страница...
function isVisible(elem) {
@ -20,7 +20,7 @@ function isVisible(elem) {
*!*
showVisible();
showVisible();
window.onscroll = showVisible;
*/!*
```

View file

@ -9,7 +9,7 @@
```js
//+ autorun
window.onscroll = function() {
window.onscroll = function() {
var scrolled = window.pageYOffset || document.documentElement.scrollTop;
document.getElementById('showScroll').innerHTML = scrolled + 'px';
}