- //console.log(s);
- for (var i = 0; i < s.length; i++) {
- a = s[i];
- var h = window.innerHeight - a.getBoundingClientRect().top - 20;
+
+ s.each(function(i, a) {
+ a = $(a);
+ var h = window.innerHeight - a.offset().top - a.attr("data-smart-scroll-padding-bottom");