0
Good morning, all right?
I’m trying, but I still can’t use the effect Transition to smooth the exchange of display:block
for display:none
and virse and versa.
I’m using JS to when the user scrolls the page apply the display:none
, but this is happening kind of fast, wanted it to happen slower to leave a more natural effect, someone could 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';
}
});
});
Face there is no "half display" vc does not get this transition smoothly, in the case of the display is type Yes or No. To do this you either have to use Opacity, so you can make a smooth transition
– hugocsl