aboutsummaryrefslogtreecommitdiff
path: root/web/scripts3.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/scripts3.js')
-rw-r--r--web/scripts3.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/web/scripts3.js b/web/scripts3.js
index a1afb433..8a33351e 100644
--- a/web/scripts3.js
+++ b/web/scripts3.js
@@ -386,16 +386,19 @@ $(document).ready(function() {
$(this).off('click');
});
- if(!!$('.stickya').offset()) {
- var stickyTop = $('.stickya').offset().top;
+ if(!!$('#column').offset()) {
+ var stickyTop = $('#column').offset().top;
$(window).scroll(function() {
var windowTop = $(window).scrollTop();
+ var column=$('#column');
if (stickyTop < windowTop) {
- $('.stickya').css({
- position:'fixed'
- });
- } else {
- $('.stickya').css('position','absolute');
+ if(column.hasClass('fix')==false) {
+ column.removeClass('abs');
+ column.addClass('fix');
+ }
+ } else if(column.hasClass('fix')==true) {
+ column.removeClass('fix');
+ column.addClass('abs');
}
});
}