diff options
author | Ugnich Anton | 2012-12-31 16:33:35 +0700 |
---|---|---|
committer | Ugnich Anton | 2012-12-31 16:33:35 +0700 |
commit | ed2f70f338bbed7b608fcc5b07f751d5b99d4f53 (patch) | |
tree | a498f07b87338faeb1ffb11eb81e433f2e7c2876 /web/scripts3.js | |
parent | 6b1dafc1cc3a610fc2aa5c4562fb19e3dd0798f8 (diff) |
Mobile CSS
Diffstat (limited to 'web/scripts3.js')
-rw-r--r-- | web/scripts3.js | 17 |
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'); } }); } |