Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • fr1g0s Friend
    #991041

    Hello! I do not want to use these blocks on the site – <?php $this->loadBlock('top-bar') ? <?php $this->loadBlock('header') ?> I removed this code from templates. But now there was a bug – When scrolling the page is at the top, and click on any part of the screen, then to the block "t3-mainnav" is added and remove class "affix" and "affix-top"

    The same occurs with other elements, such as "up" button at the point of emergence. Please help!


    1. affix1
    2. affix2
    Saguaros Moderator
    #991098

    Hi,

    By default, when you scroll down the page, the ‘affix’ class will be added into the mainnav to help it be sticky.

    How you want to achieve now? remove this sticky feature?

    In the file: ROOT/templates/ja_healthcare/js/script.js look for this snippet of code (line 91):

    Add Affix to JA MainMenu
      $(window).ready(function () {
        if($('#t3-mainnav').length > 0) {
          $('#t3-mainnav').affix({
            offset: {
              top: $('#t3-header').outerHeight() + $('.t3-top-bar').outerHeight()
            }
          });
        }
      });

    This code helps to add ‘affix’ class into the mainnav

    fr1g0s Friend
    #991340

    Hello!

    By default, when you scroll down the page, the ‘affix’ class will be added into the mainnav to help it be sticky.

    – Thank you, I know about it …
    But if you read my post a little more closely at the problem in a different ..

    How you want to achieve now? remove this sticky feature?

    – No, I want to keep this function, I need to remove the event "click" after which it works!

    I recorded a video, where, after clicking in different places on the screen is activated affix! This occurs when there are no blocks – ‘top-bar’ and ‘header’

    With best regards, thanks in advance for your help!


    1. bug4
    Saguaros Moderator
    #991467

    I got your point, maybe the header is removed causing this.

    I will pass this to the team but does this affect any function on your site?

    fr1g0s Friend
    #991631

    Hello!
    I changed the site and accesses the address for the site I’m working on ..
    Just I recorded a gif for clarity of my problem – https://yadi.sk/i/V6AMDR7szxWMi

    Saguaros Moderator
    #992117

    Let me check further for this circumstance and will get back to you.

    fr1g0s Friend
    #993616

    Hello! Do you have any news?

    Saguaros Moderator
    #993699

    I tried to duplicate the issue again at my end but no luck. What I’ve done is:

    • In the file: ROOT/templates/ja_healthcare/tpls/default.php
    • Remove 2 lines of code which retrieve topbar and header block of template:

    <?php $this->loadBlock(‘top-bar’) ?>

    <?php $this->loadBlock(‘header’) ?>

    • Check as your gif but it works normally

    The same with your test site: http://test.brandup.pro/

    Kindly check again.

    fr1g0s Friend
    #993707
    This reply has been marked as private.
    Saguaros Moderator
    #993782

    Hi,

    I checked the layout file on your site but still see the topbar block in ‘default’ layout.

    How did you customize on your site? because, when I tried to remove topbar + header blocks as I mentioned in my last post, I see it works exactly like: http://test.brandup.pro/ . You can see that clicking on main menu, it still works normally.

    Regards

    fr1g0s Friend
    #993793

    Hello! The problem arises when there are none of these blocks (deleted), or positions are not used. Well certainly you just will not see it on your website, if not look in web ispector, or not add styles to the top menu, which are included by adding Affix.. But the problem is not in my CSS, in the fact that is triggered Affix by clicking.. I do not know how else to explain it to you .. In the screenshot clearly shows all .. please download it and look, I can not be attached because it is more than 2 megabytes – https://yadi.sk/i/V6AMDR7szxWMi

    fr1g0s Friend
    #994043

    Maybe you are not there click..?
    You do not need to click on the menu links… Click on the header (next to the menu) !

    Saguaros Moderator
    #994575

    It looks like it happens when removing the topbar and header. Let me check further and will get back to you.

    fr1g0s Friend
    #994640

    Ok, looking forward your reply!

    Saguaros Moderator
    #994752

    I updated the above JS code a bit:

    Add Affix to JA MainMenu
      $(window).ready(function () {
        if($('#t3-mainnav').length > 0) {
          $('#t3-mainnav').affix({
            offset: {
              top: $('#t3-header').outerHeight() + $('.t3-top-bar').outerHeight()-1
            }
          });
        }
      });

    You can check it now.

Viewing 15 posts - 1 through 15 (of 15 total)

This topic contains 14 replies, has 2 voices, and was last updated by  Saguaros 7 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum