0
I made a jquery to add a Fixed on the page logo depending on the amount of scrolling, but it is very done, when it passes the amount of scroll that the logo gets Fixed the logo a "jump" to the middle of the page... Well the page is politicadascidades.com.br watch the logo when you scroll the page a certain amount.
Well my jquery code is like this
        $(function(){   
        var nav = $('#titulo');   
        $(window).scroll(function () { 
            if ($(this).scrollTop() > 100   ) { 
                nav.addClass("titulo-fixo"); 
            } else { 
                nav.removeClass("titulo-fixo"); 
            } 
        });  
    });
and the css it will add is
   .titulo-fixo{
   position:fixed;
   top:0;
   z-index:99;
  }
I have tried to decrease or increase the roll but the "hop" is inevitable
Because you don’t let it Fixed at once?
– andrepaulo
Yes I did it @andrepaulo but then he ate the image below
– Anderson Henrique
on the bottom image Voce has to breathe, ex.
margin-top: 100px;– andrepaulo
#mobileFachada{ margin-top: 158px;}– andrepaulo
I managed to solve a lot Thanks to all I did almost the same andrepaulo spoke I left from the start Fixed soon and added a margin-top of 2%
– Anderson Henrique
answers the question, with the code used and accepts the answer.
– Edilson