Responsive Full Width jQuery Carousel Plugin - Sleek Slider
File Size: | 1.94 MB |
---|---|
Views Total: | 11741 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

A lightweight and sleek jQuery carousel plugin that helps you create a fully responsive image/content slider with multiple kinds of navigation (SVG arrows with thumbnails, pagination and navigation tabs).
How to use it:
1. Include the latest jQuery JavaScript library and the jQuery Sleek Slider plugin at the bottom of your web page.
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <script src="javascripts/sleekslider.min.js"></script>
2. Create the Html for the SVG Arrows.
<div class="svg-wrap"> <svg width="64" height="64" viewBox="0 0 64 64"> <path id="arrow-left" d="M46.077 55.738c0.858 0.867 0.858 2.266 0 3.133s-2.243 0.867-3.101 0l-25.056-25.302c-0.858-0.867-0.858-2.269 0-3.133l25.056-25.306c0.858-0.867 2.243-0.867 3.101 0s0.858 2.266 0 3.133l-22.848 23.738 22.848 23.738z" /> </svg> <svg width="64" height="64" viewBox="0 0 64 64"> <path id="arrow-right" d="M17.919 55.738c-0.858 0.867-0.858 2.266 0 3.133s2.243 0.867 3.101 0l25.056-25.302c0.858-0.867 0.858-2.269 0-3.133l-25.056-25.306c-0.858-0.867-2.243-0.867-3.101 0s-0.858 2.266 0 3.133l22.848 23.738-22.848 23.738z" /> </svg> </div>
3. Build the Html structure for a carousel slider with arrows/tabs navigation and a pagination.
<div class="sleekslider"> <!-- Slider Pages --> <div class="slide active bg-1"> <div class="slide-container"> <div class="slide-content"> <h1>Slide 1 Content Here</h1> </div> </div> </div> <div class="slide bg-2"> <div class="slide-container"> <div class="slide-content"> <h1>Slide 2 Some Content Here</h1> </div> </div> </div> <div class="slide bg-3"> <div class="slide-container"> <div class="slide-content"> <h1>Slide 3 Content Here</h1> </div> </div> </div> <div class="slide bg-4"> <div class="slide-container"> <div class="slide-content"> <h1>Slide 4 Some Content Here</h1> </div> </div> </div> <div class="slide bg-5"> <div class="slide-container"> <div class="slide-content"> <h1>Slide 5 Content Here</h1> </div> </div> </div> <!-- Navigation Arrows with Thumbnails --> <nav class="nav-split"> <a class="prev" href=""> <span class="icon-wrap"><svg class="icon" width="22" height="22" viewBox="0 0 64 64"> <use xlink:href="#arrow-left" /> </svg></span> <div> <h3>test</h3> <img alt="Previous thumb"/> </div> </a> <a class="next" href=""> <span class="icon-wrap"><svg class="icon" width="22" height="22" viewBox="0 0 64 64"> <use xlink:href="#arrow-right" /> </svg></span> <div> <h3>test</h3> <img alt="Next thumb"/> </div> </a> </nav> <!-- Pagination --> <nav class="pagination"> <span class="current"></span> <span></span> <span></span> <span></span> <span></span> </nav> <!-- Navigation Tabs --> <nav class="tabs"> <div class="tab-container"> <ul> <li class="current"><a href="#"><span>01</span> Slide</a></li> <li><a href="#"><span>02</span> Slide</a></li> <li><a href="#"><span>03</span> Slide</a></li> <li><a href="#"><span>04</span> Slide</a></li> <li><a href="#"><span>05</span> Slide</a></li> </ul> </div> </nav> </div>
4. The core CSS styles for the carousel slider. Insert your images into the slider using CSS background-image
property.
.sleekslider { width: 100%; height: 600px; position: relative; display: block; overflow: hidden; } .sleekslider .slide { position: absolute; top: 0; left: 0; width: 100%; height: 600px; background-repeat: no-repeat; background-position: center center; -moz-background-size: cover; -o-background-size: cover; -webkit-background-size: cover; background-size: cover; z-index: 1; content: ""; } .sleekslider .slide.active { z-index: 3; } .sleekslider .bg-1 { background-image: url("1.jpg"); } .sleekslider .bg-2 { background-image: url("2.jpg"); } .sleekslider .bg-3 { background-image: url("3.jpg"); } .sleekslider .bg-4 { background-image: url("4.jpg"); } .sleekslider .bg-5 { background-image: url("5.jpg"); } .sleekslider .tab-container { max-width: 1200px; margin: 0 auto; } .sleekslider .slide-container { max-width: 1200px; margin: 0 auto; position: relative; height: 100%; } .sleekslider .slide-content { z-index: 50; position: absolute; bottom: 30%; left: 0; padding: 0 20px; }
5. The required CSS styles for the SVG navigation arrows.
nav.nav-split .icon-wrap { position: relative; display: block; padding: 45px 5px; background-color: rgba(0, 0, 0, 0.5); } nav.nav-split svg.icon { -webkit-transition: -webkit-transform 0.3s 0.3s; transition: transform 0.3s 0.3s; fill: #fff; } nav.nav-split div { position: absolute; top: 0; width: 200px; height: 100%; background-color: rgba(0, 0, 0, 0.2); -webkit-transition: -webkit-transform 0.3s 0.3s; transition: transform 0.3s 0.3s; -webkit-perspective: 1000px; perspective: 1000px; } nav.nav-split a { position: absolute; top: 50%; display: block; outline: none; text-align: left; z-index: 1000; -webkit-transform: translateY(-50%); transform: translateY(-50%); } nav.nav-split a svg { display: block; margin: 0 auto; padding: 0; } nav.nav-split a.prev { left: 0; } nav.nav-split a.prev div { left: 0; -webkit-transform: translateX(-100%); transform: translateX(-100%); } nav.nav-split a.prev:hover svg.icon { -webkit-transform: translateX(-100%); transform: translateX(-100%); } nav.nav-split a.next { right: 0; } nav.nav-split a.next div { right: 0; text-align: right; -webkit-transform: translateX(100%); transform: translateX(100%); } nav.nav-split a.next:hover svg.icon { -webkit-transform: translateX(100%); transform: translateX(100%); } nav.nav-split a:hover svg.icon { -webkit-transition-delay: 0s; transition-delay: 0s; } nav.nav-split a:hover div { -webkit-transform: translateX(0); transform: translateX(0); } nav.nav-split a:hover h3 { -webkit-transition-delay: 0.6s; transition-delay: 0.6s; -webkit-transform: rotateX(0deg); transform: rotateX(0deg); font-weight: bold; } nav.nav-split h3 { position: absolute; top: 100%; margin: 0; padding: 0 20px; width: 100%; height: 30%; background-color: rgba(0, 0, 0, 0.5); color: #fff; text-transform: uppercase; white-space: nowrap; letter-spacing: 1px; font-weight: 500; font-size: 0.75em; line-height: 2.75; -webkit-transition: -webkit-transform 0.3s; transition: transform 0.3s; -webkit-transform: rotateX(-90deg); transform: rotateX(-90deg); -webkit-transform-origin: 50% 0; transform-origin: 50% 0; -webki-backface-visibility: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; } nav.nav-split img { position: absolute; top: 0; left: 0; width: 100%; }
6. The required CSS styles for the Pagination.
nav.pagination { position: absolute; bottom: 20%; text-align: center; width: 100%; z-index: 10; } nav.pagination span { width: 12px; height: 12px; display: inline-block; background-color: transparent; box-shadow: inset 0 0 0 2px white; -webkit-transition: box-shadow 0.3s ease; transition: box-shadow 0.3s ease; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; margin: 5px; cursor: pointer; } nav.pagination span.current { box-shadow: inset 0 0 0 8px white; } nav.pagination span:hover { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
7. The required CSS styles for the navigation tabs.
nav.tabs { position: absolute; bottom: 0; text-align: center; width: 100%; z-index: 10; background-color: #19243c; } nav.tabs ul { margin: 0; list-style: none; } nav.tabs ul li { float: left; width: 20%; font-size: 14px; position: relative; padding: 0; text-align: left; height: 58px; font-weight: bold; margin: 0; } nav.tabs ul li.current a { background-color: #223152; top: -25px; height: 83px; padding-top: 25px; } nav.tabs ul li a { color: #fff; text-decoration: none; position: absolute; top: 0; left: 10px; z-index: 20; width: 100%; height: 58px; padding-left: 20px; padding-top: 20px; -moz-transition-property: all; -o-transition-property: all; -webkit-transition-property: all; transition-property: all; -moz-transition-duration: 0.3s; -o-transition-duration: 0.3s; -webkit-transition-duration: 0.3s; transition-duration: 0.3s; } nav.tabs ul li a:visited { color: #fff; } nav.tabs ul li a:focus { color: #fff; } nav.tabs ul li a:hover { color: #fff; } nav.tabs ul li a:active { color: #fff; } nav.tabs ul li a span { color: #a2680c; } nav.tabs ul li a span:visited { color: #a2680c; } nav.tabs ul li a span:focus { color: #a2680c; } nav.tabs ul li a span:hover { color: #a2680c; } nav.tabs ul li a span:active { color: #a2680c; } nav.tabs ul li a:hover { background-color: #1d2945; }
8. Initialize the plugin and config the navigation thumbnails & labels.
$(document).ready(function(){ $('.sleekslider').sleekslider({ thumbs: ['1.jpg', '2.jpg', '3.jpg','4.jpg','5.jpg'], labels:['Slide 1', 'Slide 2', 'Slide 3', 'Slide 4', 'Slide 5'], speed: 6000 // transition speed }); })
This awesome jQuery plugin is developed by shawn458. For more Advanced Usages, please check the demo page or visit the official website.