Good day! When connecting scripts:

// Запускаем отмену прокрутки страницы обложки function OffScroll() { var winScrollTop = $(window).scrollTop(); $(window).bind('scroll', function() { $(window).scrollTop(winScrollTop); }); } OffScroll(); // Восстанавливаем прокрутку $(document).ready(function() { $('.open').click(function() { $(window).unbind('scroll'); }); }); // Закрываем обложку $(function() { $('.open').click(function(){ $('.cover').fadeToggle(1000); }); }); 

The following scripts stop working:

 // Дублируем название jQuery(function(f){ var element = f('#top-panel-h1'); f(window).scroll(function(){ element['fade'+ (f(this).scrollTop() > 66 ? 'In': 'Out')](100); }); }); // Кнопка вверх $(function(){ $.fn.scrollToTop=function(){ $(this).hide().removeAttr("href"); if($(window).scrollTop()!="0"){ $(this).fadeIn("slow") } var scrollDiv=$(this); $(window).scroll(function(){ if($(window).scrollTop()=="0"){ $(scrollDiv).fadeOut("slow") }else{ $(scrollDiv).fadeIn("slow") } }); $(this).click(function(){ $("html, body").animate({scrollTop:0},"fast") }) } }); $(function() {$("#top").scrollToTop();}); 

The up button and the title double are not displayed when scrolling the page. How to avoid conflict? Thanks for the help!

  • Well, you yourself scroll canceled. - Jean-Claude
  • try looking towards event.namespace this will allow you to unsubscribe specific events, besides, instead of bind / undind, it's better to immediately on / off as they are directly called inside bind / undind - Grundy
  • I canceled the cancel, but when I click on the block, the scroll is restored. And after the cover is closed, the scroll works, but other scripts stop working. So I do not understand why? - LADYX
  • what other scripts? - Grundy
  • Button up and double of the name - those that I indicated in my question. - LADYX

0