"slideToggle drowpdown"
Bootstrap 4.1.1 Snippet by ranjit1602

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <a href="#" id="click-menu"> click <span><img src="next.png" alt=""></span></a> <div class="menu"> <span class="close">X</span> <ul> <li><a href="">1</a></li> <li><a href="">2</a></li> <li><a href="">3</a></li> <li><a href="">4</a></li> </ul> </div>
.menu{ display: none; } #click-menu span img{transition: 0.5s all ease-in;} .active span img {transform: rotate(90deg);}
$(document).ready(function(){ $('#click-menu').click(function(){ $(this).next().slideToggle(250); $(this).toggleClass('active'); }); $('.close').click(function(){ $('.menu').slideUp(250); $('#click-menu').removeClass('active'); }); });

Related: See More


Questions / Comments: