Infinite Loop Carousel With Parallax Backgrounds - jQuery XLLJSBanner

Infinite Loop Carousel With Parallax Backgrounds - jQuery XLLJSBanner
File Size: 762 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A jQuery based banner slider/carousel that enables the visitor to loop infinitely over images with thumbnail navigation and parallax scrolling backgrounds.

How to use it:

1. Add backgrounds, thumbnails, and images to the carousel.

<div id="banner">

  <!-- Parallax Background -->
  <div class="bannerBg">
      <div class="bannerBg01"></div>
      <div class="bannerBg02"></div>
      <div class="bannerBg03"></div>
  </div>

  <!-- Image Loading Indicator -->
  <div class="banner_loading">Loading...</div>

  <!-- Carousel Content -->
  <div class="banner_content">
      <ul class="banner_images">
          <li><img src="images/1.jpg" alt="Image Alt"></li>
          <li><img src="images/2.jpg" alt="Image Alt"></li>
          <li><img src="images/3.jpg" alt="Image Alt"></li>
          <li><img src="images/4.jpg" alt="Image Alt"></li>
          <li><img src="images/5.jpg" alt="Image Alt"></li>
          <li><img src="images/6.jpg" alt="Image Alt"></li>
      </ul>
      <!-- Navigation Controls -->
      <div class="bannerGuide">
        <span class="bannerGuide_last"></span>
         <span class="bannerGuide_next"></span>
      </div>
      <!-- Thumbnails -->
      <ul class="banner_thumbnails">
          <li><img src="images/thumbs/1.jpg" alt="Image Alt"></li>
          <li><img src="images/thumbs/2.jpg" alt="Image Alt"></li>
          <li><img src="images/thumbs/3.jpg" alt="Image Alt"></li>
          <li><img src="images/thumbs/4.jpg" alt="Image Alt"></li>
          <li><img src="images/thumbs/5.jpg" alt="Image Alt"></li>
          <li><img src="images/thumbs/6.jpg" alt="Image Alt"></li>
      </ul>
  </div>
</div>

2. Add parallax images to the background.

.bannerBg{
  background: url("bg.png") repeat;
}

.bannerBg div{
  position:absolute;
  top:0px;
  left:0px;
  width:100%;
  height:420px;
}

.bannerBg01{
  background: url("bg1.png");
}

.bannerBg02{
  background: url("bg2.png");
}

.bannerBg03{
  background: url("bg3.png");
}

3. Add a loading spinner to the image loading indicator.

.banner_loading{
  color: #FFFFFF;
  font-size: 20px;
  padding: 15px 15px 15px 50px;
  background: url("ajax-loader.gif") no-repeat 10px 50%;
  border-radius: 15px;
  width: 180px;
  position: absolute;
  top: 150px;
  left: 50%;
  margin-left: -90px;
}

5. The core CSS for the carousel.

#banner{
  width: 100%;
  height: 420px;
  border-top: 7px solid yellow;
  border-bottom: 7px solid yellow;
  box-shadow: 0px 0px 7px black;
  position: relative;
  overflow-x: hidden;
}

.banner_content{
  display: none;
}

.banner_content ul{
  list-style: none;
  position: absolute;
}

ul.banner_images li{
  float: left;
  height: 420px;
}

ul.banner_images li img{
  display: block;
  margin: 30px auto 0px;
  box-shadow: 0px 0px 7px #222;
  border: 8px solid transparent;
  border-radius: 4px;
}

.bannerGuide span{
  background-color: red;
  width: 30px;
  height: 60px;
  box-shadow: 0px 0px 7px yellow;
  position: absolute;
  top: 145px;
  border-radius: 4px;
  cursor:pointer;
}

.bannerGuide span:hover{
  opacity: 0.9;
}

.bannerGuide span.bannerGuide_last{
  background: #000 url("prev.png") no-repeat center center;
}

.bannerGuide span.bannerGuide_next{
  background: #000 url("next.png") no-repeat center center;
}

ul.banner_thumbnails{
  height: 35px;
  position: absolute;
  top: 320px;
  left: 50%;
}

ul.banner_thumbnails li{
  position: absolute;
}

ul.banner_thumbnails li img{
  border: 5px solid #FFFFFF;
  box-shadow: 0px 0px 7px red;
  cursor: pointer;
  opacity: 0.7;
}

ul.banner_thumbnails li.selected img{
  opacity: 0.9;
}

6. Load jQuery JavaScript library and the XLLJSBanner's script at the end of the document. Done.

<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/index.js"></script>

This awesome jQuery plugin is developed by b593771943. For more Advanced Usages, please check the demo page or visit the official website.