Skip to content

Commit

Permalink
Merge pull request #10 from f0rmat1k/jsdoc
Browse files Browse the repository at this point in the history
Jsdoc
  • Loading branch information
frux committed Jun 14, 2015
2 parents fe18740 + 9210f93 commit e4d7bcb
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions lib/scrollissimo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
* @author frux <qdinov@yandex.ru>
* @url https://github.com/Promo/scrollissimo
*/

/* global TimelineLite, TimelineMax, S, S.Queue */

(function(doc, win){

var Queue,
Scrollissimo = {},
lastScroll = 0,
Expand All @@ -18,17 +22,23 @@
* Get scrollTop
* @returns {Number} page's scrollTop
*/
function getScrollTop(){
var getScrollTop = function(){
if(typeof pageYOffset !== 'undefined'){
//most browsers except IE before 9
return pageYOffset;
getScrollTop = function(){
return pageYOffset;
};
}else{
var B = doc.body; //IE 'quirks'
var D = doc.documentElement; //IE with doctype
D = (D.clientHeight) ? D : B;
return D.scrollTop;
getScrollTop = function(){
var B = doc.body; //IE 'quirks'
var D = doc.documentElement; //IE with doctype
D = (D.clientHeight) ? D : B;
return D.scrollTop;
};
}
}

getScrollTop();
};

/**
* Get document's height
Expand Down Expand Up @@ -243,7 +253,7 @@

/**
* Render all animation queues
* @private
* @protected
*/
Scrollissimo._render = (function(progress, ignoreSmooth){
//for each animation's queues
Expand Down Expand Up @@ -308,4 +318,4 @@
win.Scrollissimo = Scrollissimo;
}

})(document, window);
})(document, window);

0 comments on commit e4d7bcb

Please sign in to comment.