Fast-Learn 33 ارسال شده در تیر 96 گزارش بازنشر ارسال شده در تیر 96 سلام. من نسخه رایگان افزونه commentator رو از یه سایت دانلود کردم، وقتی که فعالش میکنم، یدونه از اسکریپتایی که نوشتم (شایدم بیشتر) از کار میفته. چکار کنم؟ اسکریپتی هم که از کار میفته اینه: $(function () { function bottom_page(element) { var pix = $('body').css('height').replace('px','') - $(element).offset().top - $(element).height(); return pix; } var $sidebar = $("#related-sidebar"), $window = $(window), offset = $sidebar.offset(), $post = $('article#main'), topPadding = 35; var s = $window.scrollTop(); $window.scroll(function() { if(bottom_page('#sidebar') <= bottom_page('#post-content') && s <= $window.scrollTop()){ } else if ($window.scrollTop() > offset.top && $('body').css('width').replace('px','') >= 992 ) { $sidebar.stop().animate({ marginTop: $window.scrollTop() - offset.top + topPadding, }); } else { $sidebar.stop().animate({ marginTop: 0 }); } s = $window.scrollTop(); }); }); لینک به ارسال
پست های پیشنهاد شده