Bootstrap snippet and html example. portfolio grid with jquery shuffle js

This html snippet was created to help web designers, web developers, front-end and back-end developer save time. Use it for free in your project and build your app faster, You can also download the HTML, CSS, and JS code.
Tags: portfolio

HTML code

This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 4.5.0 included, to get the result that you can see in the preview selection

<script src="https://cdnjs.cloudflare.com/ajax/libs/Shuffle/5.2.3/shuffle.min.js" integrity="sha512-VHIYn9ssmuPBliadBEgGCTRtCO4agkhQCxiPaTBKaAq0cm2KKpX+PE2klG1VfOHKKcN5eZcev0M3s5V2xXxVew==" crossorigin="anonymous"></script>
<section class="lg bg-white">
    <div class="container">
        <div class="section-title-area text-center mb-70">
            <h2 class="section-title">PROJECTS</h2>
            <h5 class="section-sub-title fs-12">Latest Work</h5>
        </div><!-- / section-title-area -->
        <ul class="portfolio-filter list-inline text-center mb-30">
            <li><a href="#" data-group="all" class="ml-2 active">All</a></li>
            <li><a href="#" data-group="skill" class="">Creative</a></li>
            <li><a href="#" data-group="skill2" class="">Minimal</a></li>
            <li><a href="#" data-group="skill3" class="">Design</a></li>
        </ul>
        <ul class="row portfolio lightbox list-unstyled mb-0 shuffle" id="grid" >
            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/FFB6C1/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Hemisphere</h5>
                                    <p class="project-skill">Creative</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="https://www.bootdey.com/image/350x280/87CEFA/000000" class="image-lightbox" title="Hemisphere"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill2&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Cube</h5>
                                    <p class="project-skill">Minimal</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="https://www.bootdey.com/image/350x280/87CEFA/000000" class="image-lightbox" title="Cube"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill3&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Knoll</h5>
                                    <p class="project-skill">Design</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="assets/images/project-tall1.jpg" class="image-lightbox" title="Knoll"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Longo</h5>
                                    <p class="project-skill">Creative</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="assets/images/project-tall2.jpg" class="image-lightbox" title="Longo"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill2&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Red Hill</h5>
                                    <p class="project-skill">Minimal</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="assets/images/project-square1.jpg" class="image-lightbox" title="Red Hill"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill3&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">White Bed</h5>
                                    <p class="project-skill">Design</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="https://www.bootdey.com/image/350x280/87CEFA/000000" class="image-lightbox" title="White Bed"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Estudio</h5>
                                    <p class="project-skill">Creative</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="assets/images/project-tall3.jpg" class="image-lightbox" title="Estudio"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill2&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Hygge</h5>
                                    <p class="project-skill">Minimal</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="https://www.bootdey.com/image/350x280/87CEFA/000000" class="image-lightbox" title="Hygge"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill3&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Headphones</h5>
                                    <p class="project-skill">Design</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="assets/images/project-square2.jpg" class="image-lightbox" title="Headphones"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Arbi Belt</h5>
                                    <p class="project-skill">Creative</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="assets/images/project-square3.jpg" class="image-lightbox" title="Arbi Belt"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill2&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Air Lids</h5>
                                    <p class="project-skill">Minimal</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="https://www.bootdey.com/image/350x280/87CEFA/000000" class="image-lightbox" title="Air Lids"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->

            <!-- project -->
            <li class="col-md-6 col-lg-4 project shuffle-item filtered" data-groups="[&quot;skill3&quot;]" >
                <figure class="portfolio-item">
                    <div class="hovereffect">
                        <img class="img-responsive" src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="">
                        <div class="overlay">
                            <div class="hovereffect-title">
                                <a href="#x" class="project-title-wrapper">
                                    <h5 class="project-title fs-18">Bulb</h5>
                                    <p class="project-skill">Design</p>
                                </a><!-- / project link -->
                                <div class="hover-icons">
                                    <a href="#x"><i class="ti-eye"></i></a>
                                    <a href="https://www.bootdey.com/image/350x280/87CEFA/000000" class="image-lightbox" title="Bulb"><i class="ti-arrows-corner"></i></a>
                                </div><!-- / hover-icons -->
                            </div><!-- / hovereffect-title -->
                        </div><!-- / overlay -->
                    </div><!-- / hovereffect -->
                </figure><!-- / portfolio-item -->
            </li><!-- / project -->
        </ul><!-- / portfolio -->
    </div><!-- / container -->
</section>

CSS code

This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 4.5.0 included, to get the result that you can see in the preview selection

body{margin-top:20px;}
/*------- portfolio -------*/
.project {
  margin: 15px 0;
  border-radius: 5px;
}

.project .hovereffect {
  border-radius: 5px;
}

.no-gutter .project {
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.no-gutter .project .hovereffect {
  border-radius: 0 !important;
}

.no-gutter .project .hovereffect {
  border-radius: 0 !important;
}

.card .project {
  margin: 0;
  border-radius: 0;
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
}

.card .project img {
  border-radius: 0;
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
}

.card .project .portfolio-item {
  margin: 0;
}

.card .project .hovereffect {
  border-radius: 0;
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
}

.has-spacer {
  margin-left: 30px;
  margin-right: 30px;
  margin-bottom: 30px;
}

.has-spacer-extra-space {
  margin-left: 30px;
  margin-right: 30px;
  margin-bottom: 30px;
}

.has-side-spacer {
  margin-left: 30px;
  margin-right: 30px;
}

.project-title {
  font-size: 1.25rem;
}

.project-skill {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04rem;
}

/*--- lightbox ---*/
.mfp-wrap {
  z-index: 999999 !important;
}

.mfp-bg {
  background: #1a1918 !important;
  opacity: 0.9 !important;
  z-index: 999998 !important;
}

.mfp-content {
  max-width: 80% !important;
}

.body.dark .mfp-figure:after {
  box-shadow: none !important;
  background: #505254 !important;
}

.mfp-figure:after {
  box-shadow: none !important;
  background: #d5d2ce !important;
}

.mfp-close {
  content: "\e646" !important;
  font-family: 'themify' !important;
  right: -8px !important;
  font-weight: 300 !important;
  font-size: 30px !important;
  color: #fff !important;
  opacity: 0.7 !important;
  top: -3px !important;
  -moz-transition: 0.2s ease-in-out;
  -o-transition: 0.2s ease-in-out;
  -webkit-transition: 0.2s ease-in-out;
  transition: 0.2s ease-in-out;
}

.mfp-close:hover {
  opacity: 1 !important;
}

.mfp-arrow {
  color: #fff;
  opacity: 0.7 !important;
  -moz-transition: 0.2s ease-in-out;
  -o-transition: 0.2s ease-in-out;
  -webkit-transition: 0.2s ease-in-out;
  transition: 0.2s ease-in-out;
}

.mfp-arrow:hover {
  opacity: 1 !important;
}

.mfp-arrow:after {
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  top: 5px !important;
}

.mfp-arrow-right:before {
  border-left: none !important;
}

.mfp-arrow-left:before {
  border-right: none !important;
}

.mfp-arrow-right:after {
  content: "\e649" !important;
  font-family: 'themify';
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 30px;
  border-right: none !important;
  margin-left: 25px !important;
}

.mfp-arrow-left:after {
  content: "\e64a" !important;
  font-family: 'themify';
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 30px;
  border-right: none !important;
  margin-left: 15px !important;
}

.mfp-title {
  color: #d5d4d3 !important;
  font-size: 1rem !important;
  line-height: 1.75rem !important;
  font-weight: 400 !important;
}

.mfp-counter {
  color: #d5d4d3 !important;
  font-size: 1rem !important;
  line-height: 1.75rem !important;
  font-weight: 400 !important;
}

.mfp-fade.mfp-bg.mfp-removing {
  opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
  opacity: 0;
  -webkit-transition: all 0.3s ease-out;
  -moz-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
  opacity: 1;
}

.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
  opacity: 0;
}

@-webkit-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@-moz-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@-o-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.mfp-figure {
  -webkit-animation-name: fadeIn;
  -moz-animation-name: fadeIn;
  -o-animation-name: fadeIn;
  animation-name: fadeIn;
  -webkit-animation-duration: 1s;
  -moz-animation-duration: 1s;
  -ms-animation-duration: 1s;
  -o-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  -moz-animation-fill-mode: both;
  -ms-animation-fill-mode: both;
  -o-animation-fill-mode: both;
  animation-fill-mode: both;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
}

.mfp-iframe-scaler iframe {
  padding: 15px 0;
  background: transparent !important;
  box-shadow: none !important;
}

/*--- end of lightbox ---*/
/*--- default effect ---*/
.hovereffect {
  width: 100%;
  height: 100%;
  float: left;
  overflow: hidden;
  position: relative;
  text-align: center;
  z-index: 2;
}

.hovereffect .overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  overflow: hidden;
  top: 0;
  left: 0;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.9);
  -webkit-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out;
}

.primary-dark .hovereffect .overlay {
  background-color: rgba(195, 157, 109, 0.9);
}

.white .hovereffect .overlay {
  background-color: rgba(255, 255, 255, 0.9);
}

.hovereffect img {
  display: block;
  position: relative;
  -webkit-transition: all .3s linear;
  transition: all .3s linear;
}

.hovereffect:hover img {
  -ms-transform: scale(1.1);
  -webkit-transform: rotate(1.1);
  transform: scale(1.1);
}

.hovereffect-title .project-title-wrapper {
  position: absolute;
  top: 45%;
  left: 0;
  width: 100%;
  padding: 10px;
  transform: translateY(-50%);
  -webkit-transition: all .5s ease-in-out;
  transition: all .5s ease-in-out;
}

.project:hover .hovereffect-title .project-title-wrapper {
  top: 50%;
}

.hovereffect-title .project-title {
  color: #fff;
  background: transparent;
  margin-bottom: 5px;
}

.white .hovereffect-title .project-title {
  color: #151617;
}

.hovereffect-title p {
  color: #fff;
  background: transparent;
  font-size: 12px;
  margin: 0;
}

.white .hovereffect-title p {
  color: #515253;
}

.hovereffect-title .hover-icons {
  font-size: 16px;
  background: transparent;
  position: absolute;
  bottom: 10%;
  left: 0;
  right: 0;
  -webkit-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out;
}

.project:hover .hovereffect-title .hover-icons {
  bottom: 15%;
}

.hovereffect-title .hover-icons a {
  color: #fff;
}

.white .hovereffect-title .hover-icons a {
  color: #151617;
}

.hovereffect-title.project-icons {
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  -webkit-transition: all .5s ease-in-out;
  transition: all .5s ease-in-out;
}

project:hover .hovereffect-title .hover-icons {
  bottom: 15%;
}

.hovereffect-title .hover-icons a {
  color: #fff;
}

.white .hovereffect-title .hover-icons a {
  color: #151617;
}

.hovereffect-title.project-icons {
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  -webkit-transition: all .5s ease-in-out;
  transition: all .5s ease-in-out;
}

.project:hover .hovereffect-title.project-icons {
  top: 50%;
}

.project-icons a:hover {
  background-color: #505254 !important;
}

.hovereffect-title.project-icons a {
  display: inline-block;
  color: #fff;
  font-size: 1rem;
  line-height: 50px;
  width: 50px;
  height: 50px;
  margin: 10px;
  background: #c39d6d;
  border-radius: 50px;
}

.hovereffect-title.project-icons .hover-icons {
  color: #fff;
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  margin-top: 0;
  opacity: 1;
}

.hovereffect-title.project-icons a:hover {
  background: #8f714a;
}

.portfolio-filter a.active {
    color: #c39d6d;
    background: transparent;
    border-radius: 50px;
    padding: 10px 30px;
    border: 1px solid #c39d6d;
}
.portfolio-filter a {
    color: #515253;
    font-family: "Montserrat", sans-serif !important;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.04rem;
    line-height: 40px;
    border: 1px solid transparent;
    border-radius: 50px;
    margin: 0;
    padding: 10px 30px;
}

.portfolio-filter.list-inline li {
    display: inline-block;
    padding: 0;
}

Javascript/Jquery code

This is the javascript code used to create this bootstrap snippet, You can copy and paste the following javascript code inside a page with bootstrap 4.5.0 included, to get the result that you can see in the preview selection

var shuffleme = (function( $ ) {
  'use strict';
  var $grid = $('#grid'), //locate what we want to sort 
      $filterOptions = $('.portfolio-filter li'),  //locate the filter categories
      $sizer = $grid.find('.shuffle_sizer'),    //sizer stores the size of the items

  init = function() {

    // None of these need to be executed synchronously
    setTimeout(function() {
      listen();
      setupFilters();
    }, 100);

    // instantiate the plugin
    $grid.shuffle({
      itemSelector: '[class*="col-"]',
      sizer: $sizer    
    });
  },

      

  // Set up button clicks
  setupFilters = function() {
    var $btns = $filterOptions.children();
    $btns.on('click', function(e) {
      e.preventDefault();
      var $this = $(this),
          isActive = $this.hasClass( 'active' ),
          group = isActive ? 'all' : $this.data('group');

      // Hide current label, show current label in title
      if ( !isActive ) {
        $('.portfolio-filter li a').removeClass('active');
      }

      $this.toggleClass('active');

      // Filter elements
      $grid.shuffle( 'shuffle', group );
    });

    $btns = null;
  },

  // Re layout shuffle when images load. This is only needed
  // below 768 pixels because the .picture-item height is auto and therefore
  // the height of the picture-item is dependent on the image
  // I recommend using imagesloaded to determine when an image is loaded
  // but that doesn't support IE7
  listen = function() {
    var debouncedLayout = $.throttle( 300, function() {
      $grid.shuffle('update');
    });

    // Get all images inside shuffle
    $grid.find('img').each(function() {
      var proxyImage;

      // Image already loaded
      if ( this.complete && this.naturalWidth !== undefined ) {
        return;
      }

      // If none of the checks above matched, simulate loading on detached element.
      proxyImage = new Image();
      $( proxyImage ).on('load', function() {
        $(this).off('load');
        debouncedLayout();
      });

      proxyImage.src = this.src;
    });

    // Because this method doesn't seem to be perfect.
    setTimeout(function() {
      debouncedLayout();
    }, 500);
  };      

  return {
    init: init
  };
}( jQuery ));

$(document).ready(function()
{
  shuffleme.init(); //filter portfolio
}); 

Similar snippets

Bootstrap example and template. portfolio grid with filter menu and isotopejs

portfolio grid with filter menu and isotopejs

Bootstrap example and template. shopping and portfolio profile

shopping and portfolio profile

Bootstrap example and template. portfolio 4 columns

portfolio 4 columns

Bootstrap example and template. portfolio 3 column with name

portfolio 3 column with name

Bootstrap example and template. bs5 dark footer

bs5 dark footer

Bootstrap example and template. Bootstrap 3 Toggle Switch buttons

Bootstrap 3 Toggle Switch buttons

Bootstrap example and template. Contact list label

Contact list label

Bootstrap example and template. order tracking

order tracking

Bootstrap example and template. portfolio grid with jquery shuffle js

About this bootstrap example/template

We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.

We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.

This code example currectly have 1.0K views, Using this bootstrap snippet you have the following benefits:

Bootstrap 4.5.0

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

This code example is based on bootstrap 4.5.0 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

Jquery plugins

Great built-in plugins with jquery framework, you can easy to change all declarations

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working