This time I will share jQuery Plugin and tutorial about Just Another Simple jQuery Image Slider Plugin – smSlider, hope it will help you in programming stack.
smSlider is a lightweight and flexible jQuery image slider/slideshow plugin that features transition/easing animations, auto play, thumbnails, dots/arrows navigation and much more.
Basic Usage:
1. Include the smslider.css
file for the basic slider styles.
1 |
< link rel = "stylesheet" type = "text/css" href = "smslider.css" /> |
2. Include the jQuery javascript library and jQury smSlider plugin at the end of the html document.
2 |
< script type = "text/javascript" src = "jquery.smslider.min.js" ></ script > |
3. The markup for creating a image slider with thumbnails navigation.
04 |
< li > < img src = "images/large/1.jpg" /> </ li > |
05 |
< li > < img src = "images/large/2.jpg" /> </ li > |
06 |
< li > < img src = "images/large/3.jpg" /> </ li > |
07 |
< li > < img src = "images/large/4.jpg" /> </ li > |
08 |
< li > < img src = "images/large/5.jpg" /> </ li > |
12 |
< div class = "sm_submenu-item" data-index = "0" > < img src = "images/1.jpg" />< span class = "year" >1935</ span > |
13 |
< div class = "sm_submenu-description" >Image One</ div > |
15 |
< div class = "sm_submenu-item" data-index = "1" > < img src = "images/2.jpg" />< span class = "year" >1931</ span > |
16 |
< div class = "sm_submenu-description" >Image Two</ div > |
18 |
< div class = "sm_submenu-item" data-index = "2" > < img src = "images/3.jpg" />< span class = "year" >1937</ span > |
19 |
< div class = "sm_submenu-description" >Image Three</ div > |
21 |
< div class = "sm_submenu-item" data-index = "3" > < img src = "images/4.jpg" />< span class = "year" >1933</ span > |
22 |
< div class = "sm_submenu-description" >Image Four</ div > |
24 |
< div class = "sm_submenu-item last" data-index = "4" > < img src = "images/5.jpg" />< span class = "year" >1938</ span > |
25 |
< div class = "sm_submenu-description" >Image Five</ div > |
4. Call the plugin with default options.
01 |
<script type= "text/javascript" > |
02 |
$(document).ready( function (){ |
06 |
transition: 'animate' , |
07 |
activeClass : 'active' , |
09 |
innerBlock: 'sm_slider-inner' , |
12 |
children : 'sm_slide' , |
16 |
subMenuClass : 'sm_submenu-item' , |
23 |
animationStart : function (){}, |
24 |
animationComplete : function (){} |
Change logs:
2015-08-12
2014-09-15
- add sass, namespace, cycles reverse
This awesome jQuery plugin is developed by sashamochalin. For more Advanced Usages, please check the demo page or visit the official website.