"Change Font Awesome icon on click toogle "
Bootstrap 4.0.0 Snippet by akshayptdr4

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/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 ----------> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <div class="container text-center" > <div class="row"> <a id="menu-toggle" href="#" ><i class="fa fa-toggle-on"></i></a> </div> </div>
i{ margin-top:100px; font-size:50px !important; }
$('#menu-toggle').click( function(){ $(this).find('i').toggleClass('fa fa-toggle-on').toggleClass('fa fa-toggle-off'); });

Related: See More


Questions / Comments: