Không thấy nội dung tìm kiếm. Hãy thử tìm kiếm khác.

if ($(window).width() >= 1024) { /* ads float */ if ( window.innerWidth >= 1000){ if( $('body').find('.tieudiem').length != 0 ){ var top = $('#sidebar').offset().top - parseFloat($('#sidebar').css('marginTop').replace(/auto/, 0)); var footTop = $('.footer-slider-wrap').offset().top - parseFloat($('.footer-slider-wrap').css('marginTop').replace(/auto/, 0)); var maxY = footTop - $('#sidebar').outerHeight(); $(window).scroll(function() { "use strict"; var y = $(this).scrollTop(); if (y + 40 > top) { if (y + 40 < maxY ) { $('#sidebar').addClass('fixed').removeAttr('style'); } else { $('#sidebar').removeClass('fixed').css({ position: 'relative', top: (maxY - top - 10 ) + 'px' }); } } else { $('#sidebar').removeClass('fixed'); } }); var $element = $('.tieudiem'); var lastHeight = $('.tieudiem').offset().top ; function checkForChanges() { if ($element.offset().top != lastHeight) { lastHeight = $('.tieudiem').offset().top footTop = $('.footer-slider-wrap').offset().top - parseFloat($('.footer-slider-wrap').css('marginTop').replace(/auto/, 0)); maxY = footTop - $('#sidebar').outerHeight(); window.console.log('changed'); } setTimeout(checkForChanges, 1000); } checkForChanges(); } } }