I'm trying, but I have not yet been able to use the transition effect to make smooth switching from display:block
to display:none
and vice versa.
I'm using JS for when the user rolls the page to apply display:none
, however this is happening half fast, wanted it to happen slower to leave a more natural effect, could anyone help me?
var $JQuery = jQuery.noConflict()
$JQuery(function() {
$JQuery(window).on("scroll", function() {
if($JQuery(window).scrollTop() > 80) {
document.getElementById('headerTota').style.display = 'none';
} else {
document.getElementById('headerTota').style.display = 'block';
}
});
});