"Like button toggle"
Bootstrap 4.0.0 Snippet by http://www.dotnetqueries.com/

<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"> <div class="row"> <!-- Add icon library --> <div class="btn btn-link btn-lg btn-like"> <i onclick="likeToggle(this)" class="fa fa-thumbs-up"></i> </div> </div> </div>
.btn-like { background-color: #fff; border: 1px solid #ddd; padding: 20px; text-align: center; text-decoration: none; display: inline-block; font-size: 30px; margin: 4px 2px; }
function likeToggle(x) { x.classList.toggle("fa-thumbs-down"); }

Related: See More


Questions / Comments: