"Portfolio Gallery"
Bootstrap 3.3.0 Snippet by anandprakash

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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 ----------> <div class="container"> <div class="row"> <div class="gallery col-lg-12 col-md-12 col-sm-12 col-xs-12"> <h1 class="gallery-title">Gallery</h1> </div> <div align="center"> <button class="btn btn-default filter-button" data-filter="all">All</button> <button class="btn btn-default filter-button" data-filter="hdpe">Virtual Reality</button> <button class="btn btn-default filter-button" data-filter="spray">Video Tutorials</button> <button class="btn btn-default filter-button" data-filter="irrigation">Customised For You</button> </div> <br/> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter hdpe"> <!-- <img src="http://fakeimg.pl/365x365/" class="img-responsive"> --> <img src="https://vrook.co/img/vr2.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter hdpe"> <img src="https://vrook.co/img/vr.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter hdpe"> <img src="https://vrook.co/img/vr5.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter hdpe"> <img src="https://vrook.co/img/vr3.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter spray"> <img src="https://vrook.co/img/vt.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter spray"> <img src="https://vrook.co/img/vt1.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter spray"> <img src="https://vrook.co/img/vt2.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter spray"> <img src="https://vrook.co/img/vt3.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter irrigation"> <img src="https://vrook.co/img/Syllabus.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter irrigation"> <img src="https://vrook.co/img/custmise1.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter irrigation"> <img src="https://vrook.co/img/custmise2.png" class="img-responsive"> </div> <div class="gallery_product col-lg-3 col-md-3 col-sm-3 col-xs-6 filter irrigation"> <img src="https://vrook.co/img/Assessement.png" class="img-responsive"> </div> </div> </div>
.gallery-title { font-size: 36px; color: #42B32F; text-align: center; font-weight: 500; margin-bottom: 70px; } .gallery-title:after { content: ""; position: absolute; width: 7.5%; left: 46.5%; height: 45px; border-bottom: 1px solid #5e5e5e; } .filter-button { font-size: 18px; border: 1px solid #42B32F; border-radius: 5px; text-align: center; color: #42B32F; margin-bottom: 30px; } .filter-button:hover { font-size: 18px; border: 1px solid #42B32F; border-radius: 5px; text-align: center; color: #ffffff; background-color: #42B32F; } .btn-default:active .filter-button:active { background-color: #42B32F; color: white; } .port-image { width: 100%; } .gallery_product { margin-bottom: 30px; }
$(document).ready(function(){ $(".filter-button").click(function(){ var value = $(this).attr('data-filter'); if(value == "all") { //$('.filter').removeClass('hidden'); $('.filter').show('1000'); } else { // $('.filter[filter-item="'+value+'"]').removeClass('hidden'); // $(".filter").not('.filter[filter-item="'+value+'"]').addClass('hidden'); $(".filter").not('.'+value).hide('3000'); $('.filter').filter('.'+value).show('3000'); } }); if ($(".filter-button").removeClass("active")) { $(this).removeClass("active"); } $(this).addClass("active"); });

Related: See More


Questions / Comments: