Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Убрать тянущийся юзербар и меню

Recommended Posts

После того как идешь ниже по форуму, выскакивает меню и юзер бар.

Во многих шаблонах в настройках это можно было отключить, здесь же такой функции нет ( тема Liva 4.2 )

Пробовал через просмотр кода что то найти, но при удалении удаляется и основное меню



Share this post

Link to post
Share on other sites

Где-то в шаблоне есть код

Sticky menu script
(function(w, d, undefined) {
   var el_html = d.documentElement,
       el_body = d.getElementsByTagName('body')[0],
       header = d.getElementById('section-content'),
       menuIsStuck = function(triggerElement) {
           var _scrollTop = w.pageYOffset || el_body.scrollTop,
               regexp = /(nav\-is\-stuck)/i,
               classFound = el_html.className.match(regexp),
               navHeight = header.offsetHeight,
               bodyRect = el_body.getBoundingClientRect(),
               scrollValue = triggerElement ? triggerElement.getBoundingClientRect().top - bodyRect.top - navHeight : 800,
               scrollValFix = classFound ? scrollValue : scrollValue + navHeight;

           // if scroll down is 700 or more and nav-is-stuck class doesn't exist
           if (_scrollTop > scrollValFix && !classFound) {
               el_html.className = el_html.className + ' nav-is-stuck';
               el_body.style.paddingTop = navHeight + 'px';

           // if we are to high in the page and nav-is-stuck class exists
           if (_scrollTop <= 2 && classFound) {
               el_html.className = el_html.className.replace(regexp, '');
               el_body.style.paddingTop = '0px';
       onScrolling = function() {
           // this function fires menuIsStuck()…
           // and could do more stuff below

   el_html.className = el_html.className + ' js';

   // when you scroll, fire onScrolling() function
   w.addEventListener('scroll', function() {
}(window, document));

  • Upvote 1

Share this post

Link to post
Share on other sites

Спасибо, сработало)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...