I made a jquery to add a fixed in the page logo depending on the amount of scroll scrolling, however it is very done, when it passes the amount of scroll that the logo is fixed the logo of 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 scrolling, but the "jump" is inevitable