Simple Responsive jQuery CSS3 Slider Plugin

A simple jQuery/CSS3 slider plugin that provides a simple way to create a responsive, mobile-friendly slider with configurable CSS3 transitions.

jquery responsive image slider, responsive touch slider using html, professional jquery content slider plugin, jquery slider for mobile, draggable slider jquery

How to make use of it:

1. Include jQuery javascript library from google CDN.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

2. Embed a jQuery simple slider text file on the page.

<script type="text/javascript" src="simpleSlider.min.js"></script>

3. Include the latest jQuery touchSwipe extensions and page navigation.

<script type="text/javascript" src="transit.js"></script>
<script type="text/javascript" src="touchSwipe.js"></script>
<div class="slider">

<div class="slide">
<div class="slidecontent">
Content 1
</div>
</div>

<div class="slide">
<div class="slidecontent">
Content 2
</div>
</div>

...

</div>

4. Style the slider via CSS.

.slider {
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
}
.slider .slide {
width: 100%;
height: 100%;
top: 0;
left: 0;
float: left;
position: absolute;
}
.slider .slide .slidecontent {
position: absolute;
top: 50%;
width: 1000px;
padding: 0 100px;
margin-top: -125px;
}
.slider #slideposition {
position: absolute;
bottom: 50px;
left: 50%;
}
.slider #slideposition ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.slider #slideposition ul li.indicator {
display: inline-block;
height: 10px;
width: 10px;
background: #222;
margin: 0px 7px;
padding: 0;
-webkit-border-radius: 999px;
-moz-border-radius: 999px;
border-radius: 999px;
overflow: hidden;
cursor: pointer;
}
.slider #slideposition ul li.indicator.active {
background: white;
}

5. Call the plugin with options.

$(document).ready(function(){
var options = {

// The name of a slide in the slidesContainer
slides: '.slide', 

// Add possibility to Swipe
swipe: true,    

// Add 'magnetic' swiping. 
// When the user swipes over the screen the slides will attach to the mouse's position
magneticSwipe: true, 

// Accepts "slide" and "fade" for a slide or fade transition
transition: "slide", 

// Add a UL with list items to track the current slide
slideTracker: true, 

// The name of the UL that tracks the slides
slideTrackerID: 'slideposition', 

// Slide on interval
slideOnInterval: true, 

// Interval to slide on if slideOnInterval is enabled
interval: 5000, 

// Duration of an animation
animateDuration: 1500, 

// Accepts: linear ease in out in-out snap easeOutCubic easeInOutCubic easeInCirc
// easeOutCirc easeInOutCirc easeInExpo easeOutExpo easeInOutExpo easeInQuad
// easeOutQuad easeInOutQuad easeInQuart easeOutQuart easeInOutQuart easeInQuint
// easeOutQuint easeInOutQuint easeInSine easeOutSine easeInOutSine easeInBack
// easeOutBack easeInOutBack
animationEasing: 'easeInOut', 

// Pause when user hovers the slide container
pauseOnHover: false, 

// Add default CSS for positioning the slides
useDefaultCSS: false,

// Create a 'neverending/repeating' slider effect.
neverEnding: true 

};

var slider = new simpleSlider(options);
slider.init();

});

6. Methods.

$(document).ready(function(){
  $(".slider").simpleSlider();
  var slider = $(".slider").data("simpleslider");

  slider.nextSlide(); // Go to the next slide
  slider.prevSlide(); // Go to the previous slide
  slider.nextSlide(slidenumber); // Go to the given slide
});

7. Events

$(".slider").on("init", function(event){
// event.totalSlides: total number of slides
});
// It's important to bind the init event before initializing simpleSlider!

$(".slider").simpleSlider();

$(".slider").on("beforeSliding", function(event){
// event.prevSlide: previous slide ID
// event.newSlide: coming slide ID
});

$(".slider").on("afterSliding", function(event){
// event.prevSlide: previous slide ID
// event.newSlide: coming slide ID
});

responsive touch enabled jquery slider, simple jquery css3 slider Plugin/Github


See Demo And Download

Official Website(dirkgroenen): Click Here

This superior jQuery/javascript plugin is developed by dirkgroenen. For extra advanced usage, please go to the official website.

Related Posts

svg-pan-zoom-container

Adding Zoom-on-Wheel and Pan-on-Drag to Inline SVG Elements

Vanilla-js module for adding zoom and panning behavior when dragging to SVG embedded elements. A lightweight Vanilla JavaScript plugin that enables zoom and pan functions on an…

html-table-sortable-js

Sorting HTML Table Vanilla JavaScript Library | Sortable.js

Sortable – Small JS vanilla table sorter makes any table with class = “sortable“, er, sortable. That is, the user can click the table header and change…

WYSIWYG-Rich-Text-Editor

WYSIWYG Rich Text Editor With jQuery And FontAwesome | RichText

RichText jQuery implementation for WYSIWYG Rich Text Editor which uses Font Awesome Iconic Font for editor icons. It is licensed under AGPL-3.0. Initialize editor Simply call .richText() on your jQuery(‘textarea’) or jQuery(‘input’)…

email-domain-autocomplete-genie

[Autocomplete] Email Domain Suggestions Like Gmail, Outlook, or More | email-genie

Email Genie allows auto-completion in the email field by providing a list of domain suggestions (gmail.com, outlook.com, etc.). This package is lightweight, flexible, compatible with libraries (jQuery,…

JavaScript-Library-for-Creating-Squircley-Magic

[Generator] JavaScript Library for Creating Squircley Magic ✨ | squircley.js

squircley.js is the core magic of Squirclular ✨ from https://squircley.app wrapped in a simple 0-dependency JavaScript library. squircley.js can generate SVG files, add square backgrounds to DOM…