...
|
...
|
@@ -42,7 +42,8 @@ exports.init = function() { |
|
|
$(document).scroll(function() {
|
|
|
var sTop = $(this).scrollTop(),
|
|
|
cur,
|
|
|
parent;
|
|
|
parent,
|
|
|
containerH;
|
|
|
thumbContainer.each(function() {
|
|
|
var pNode = $(this).closest('.article-type-three');
|
|
|
if (sTop > pNode.offset().top) {
|
...
|
...
|
@@ -54,7 +55,8 @@ exports.init = function() { |
|
|
}
|
|
|
});
|
|
|
if (cur) {
|
|
|
if (sTop < parent.offset().top + parent.height()) {
|
|
|
containerH = cur.closest('.thumb-container').outerHeight();
|
|
|
if (sTop < parent.offset().top + parent.height() - containerH) {
|
|
|
cur.addClass('fixed');
|
|
|
} else {
|
|
|
cur.removeClass('fixed')
|
...
|
...
|
|