When I clicked on the button it was for him to go to the left for 400ms but when I click he goes straight without the animation, he "jumps" straight to the final place without going through the rest.
CSS:
#icone-menu.icone-menu-animacao{
left: -10px;
position: relative;
}
JS with JQuery:
$("#btn-menu").on("click", function(){
$('#icone-menu').toggleClass('icone-menu-animacao', 400);
});
HTML:
<a href="#" id="btn-menu">
<img src="img/menu55.png" id="icone-menu">
</a>
New CSS:
#icone-menu{
position: block;
left:0;
transition: 0.2s;
}
#icone-menu.icone-menu-animacao{
left: -10px;
position: relative;
transition: 0.2s;
}