...
|
...
|
@@ -16,7 +16,8 @@ class NewHome extends Page { |
|
|
$codeSet: $('.code-set'),
|
|
|
$resYas: $('.res-c').find('a'),
|
|
|
$trendCode: $('.trend-code'),
|
|
|
$floatTop: $('.float-top')
|
|
|
$floatTop: $('.float-top'),
|
|
|
$recommendC: $('#new-recommend-c')
|
|
|
};
|
|
|
|
|
|
this.init();
|
...
|
...
|
@@ -33,13 +34,17 @@ class NewHome extends Page { |
|
|
}
|
|
|
|
|
|
backToTop() {
|
|
|
$(document).scroll(() => {
|
|
|
if (($(document).scrollTop() >= 120)) {
|
|
|
this.selector.$floatTop.addClass('hover');
|
|
|
} else {
|
|
|
this.selector.$floatTop.removeClass('hover');
|
|
|
}
|
|
|
});
|
|
|
if (this.selector.$recommendC.length > 0) {
|
|
|
$(document).scroll(() => {
|
|
|
let recommendTop = this.selector.$recommendC.offset().top - $(document).scrollTop();
|
|
|
|
|
|
if (recommendTop <= 400) {
|
|
|
this.selector.$floatTop.addClass('hover');
|
|
|
} else {
|
|
|
this.selector.$floatTop.removeClass('hover');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
autoScroll() {
|
...
|
...
|
|