automatic style change

Asked

Viewed 28 times

-1

I’m using the theme Elevate on my website and wish to make a change:

Currently the logo in the upper left corner is displayed normally, but when going down the site, the style of the logo is changed from 'display: block' to 'display: None'. I wish that this does not occur, that even navigating down that the logo continues to be displayed, but until now, even inspecting the element did not find where I can make this change so that this property change does not occur.

  • 1

    Could you pass the code? It would be better for you to answer.

  • I passed the link of the theme precisely for this, because I do not know in what part of the code this change occurs. Hence as by the link it is possible to see the online demo of the theme someone more experienced that I could find inspecting the code.

  • I am mobile programmer... As I will see code, if I use mobile browser. But thank you for your answer to my question.

  • 1

    Sorry if I made myself look rude, this was not the intention. All help is welcome.

1 answer

1

With a little more 'investigation' I was able to discover a function in the main.js file that hid the logo, just comment it to solve the problem.

   $(window).on('scroll', function() {

        var y = $(window).scrollTop(),
            siteHeader = $('header'),
            siteLogo = siteHeader.find('.logo'),
            triggerHeight = siteHeader.innerHeight();       

       if (y > triggerHeight) {
          siteLogo.fadeOut();        
       }
      else {
         siteLogo.fadeIn();
      }

    });

I apologize again to @Maury-Veloper if I made a bad impression on my reply.

  • 1

    $(window).on('scroll', function() {

 var y = $(window).scrollTop(),
 siteHeader = $('header'),
 siteLogo = siteHeader.find('.logo'),
 triggerHeight = siteHeader.innerHeight(); 

 if (y > triggerHeight) {
 siteLogo.fadeOut(); 
 }
 else {
 siteLogo.fadeIn();
 }

 }); That’s a jQuery. Reading this code, you see the Qualizer comes out when you scroll down the page. Read : https://api.jquery.com/fadeOut/ the opacity is 0 on the page should this code make disappear.

  • 1

    Read also: https://api.jquery.com/fadeIn/ Fadein and Fadeout are jQuery animations.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.