if (disabled === true) {
return true;
}
+
+
if (names[index]) {
scrollable = false;
});
} else {
+ //fb('scroll to ' + index);
+ //alert(heights.join(','));
+
//console.info(index + ' -- Scrolling to: ' + heights[index] + ' | ' + settings.scrollSpeed + ' | ' + settings.easing);
manualScroll.calculateNearest();
}
},
- handleScroll: function () {
+ animateScroll: function () {
if (disabled === true) {
return true;
}
},
down: function () {
if (index <= heights.length - 1) {
-
if (atBottom() && index < heights.length - 1) {
-
index++;
animateScroll(index, false, true);
} else {
- if (Math.floor(elements[index].height() / $window.height()) > interstitialIndex) {
-
- // interstitialScroll(parseInt(heights[index])+($window.height()*interstitialIndex));
- interstitialScroll(Math.round(heights[index]) + ($window.height() * interstitialIndex));
+ if (Math.floor(elements[index].height() / $window.windowHeight()) > interstitialIndex) {
+ interstitialScroll(Math.round(heights[index]) + ($window.windowHeight() * interstitialIndex));
interstitialIndex += 1;
-
} else {
- // interstitialScroll(parseInt(heights[index])+(elements[index].height()-$window.height()));
- interstitialScroll(Math.round(heights[index]) + (elements[index].height() - $window.height()));
+ interstitialScroll(Math.round(heights[index]) + (elements[index].height() - $window.windowHeight()));
}
}
}
},
up: function () {
+
if (index >= 0) {
if (atTop() && index > 0) {
if (interstitialIndex > 2) {
interstitialIndex -= 1;
- // interstitialScroll(parseInt(heights[index])+($window.height()*interstitialIndex));
- interstitialScroll(Math.round(heights[index]) + ($window.height() * interstitialIndex));
+ // interstitialScroll(parseInt(heights[index])+($window.windowHeight()*interstitialIndex));
+ interstitialScroll(Math.round(heights[index]) + ($window.windowHeight() * interstitialIndex));
} else {
overflow[i] = false;
} else {
- if (($(this).css("height", "auto").outerHeight() < $window.height()) || $(this).css("overflow") === "hidden") {
- $(this).css({"height": $window.height()});
+ if (($(this).css("height", "auto").outerHeight() < $window.windowHeight()) || $(this).css("overflow") === "hidden") {
+ $(this).css({"height": $window.windowHeight()});
overflow[i] = false;
} else {
} else {
- if (($(this).outerHeight() < $window.height()) || (settings.overflowScroll === false)) {
+ if (($(this).outerHeight() < $window.windowHeight()) || (settings.overflowScroll === false)) {
overflow[i] = false;
} else {
overflow[i] = true;
}
top = $window.scrollTop();
- if (top < parseInt(heights[index]) + (elements[index].outerHeight() - $window.height()) - 28) {
+ if (top < parseInt(heights[index]) + (elements[index].outerHeight() - $window.windowHeight()) - 28) {
return false;