Side menu transition with easing

Hello! I want to put an "easing" effect to make more" smooth " the transition of the side menu that collects / expands on my site because when I click the button to collect it only collects in thousandths of a second, with no effect.

Expanded:

insert the description of the image here

Collected:

insert the description of the image here

I made an example of how it looks on this site .

JS:

$("#sidebarToggle, #sidebarToggleTop").on('click', function(e) {
$("body").toggleClass("sidebar-toggled");
$(".sidebar").toggleClass("toggled"); }

CSS:

body.sidebar-toggled footer.sticky-footer {width: 100%;}
Author: Roger Windberg, 2019-08-07

1 answers

On your ul <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar"> put transition: 500ms all; and vc will give an "attenuated" transition in the side bar pickup as vc can see in the image.

insert the description of the image here

 0
Author: hugocsl, 2019-08-08 01:24:55