jquery - Collapse effect toogle -


i have little toggle script navbar. how can add animate effect?

this script.

$(document).ready(function(){     $("button").click(function(){         $(".collapse").toggleclass(".collapse in");     }); }); 

and css

.collapse {   display: none;   visibility: hidden; } .collapse.in {   display: block;   visibility: visible; } 

you use opacity of element css:

.collapse {     opacity:0;     transition: opacity 1s linear; } .collapse.in {     opacity:1; } 

see this jsfiddle


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -