🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

SwitchingLayers is a lightweight jQuery plugin which automatically switches between a group of block elements at a given interval.


Documentation

Instalation

Get from "src" folder plugin "switching-layers.js" add it to you header under jQuery library included

This plugin requires jQuery to be included

In example used bootstrap, but you can build layout without it

Have in mind what each data-switch="switch-parent" children top div elements should be absolute and top on each other to show as in example

In your css, you will need to hide with css (display: none) data-switch="switch-parent" children top div elements and show (display: block) when active class added

Call plugin with:

 $(function(){ 	$().switchinglayers({}); }); 

//or if you want change options

$(function(){ $().switchinglayers({ mainLayer: $("[data-switch='main-layer']"), //you can change el selectors parentSwitch: $("[data-switch='switch-parent']"), //you can change el selectors switchingTime: 3, //pass seconds, it will slow down or increase speed of switching layers activeClassName: "active" //you can change active class name }); });

License

This project is licensed under the MIT License - for this read License.md file


You May Also Like