You cant animate display:none
element as element will not be in DOM
What you can do is animate with transform:translate(x)
example below.
const $menu = $('#mySidenavv');
$(document).mouseup(e => {
if (!$menu.is(e.target) // if the target of the click isn't the container...
&& $menu.has(e.target).length === 0) // ... nor a descendant of the container
{
$menu.removeClass('is-active');
}
});
$('#burger-openn').on('click', () => {
$menu.toggleClass('is-active');
});
.sidenavv {
height: 100%;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
width: 83%;
transform: translateX(-100%);
-webkit-transition: transform 1s;
-ms-transition: transform 1s;
-o-transition: transform 1s;
-moz-transition: transform 1s;
transition: transform 1s;
padding-top: 60px;
text-align: center; }
.sidenavv.is-active{
transform: translateX(0%);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="mySidenavv" class="sidenavv">
<nav id="site-navigation-mobile-blog">
<ul>
</ul>
</nav><!-- #site-navigation -->
</div>
<span id="burger-openn" class="openn">☰</span>