Slide everything into this javascript slider! Just 19kb all-inclusive, is super extensible and customizable.
There are dozens of sliders, so, why use this?
- Pure javascript, no dependencies
- Easy to use - just requires few lines of code
- Is modern! Completely CSS-based
- As responsive as you need. Adapts to any size
- Themes-based. You can also use multiple themes on the same page
- Built-in touch swipe integration
- Extendable using public functions and actions
- Can slide anything! From a simple image to iframes, to texts
- Has got an integrated images lazyloader to not affect page's speed
- Supporting HTML5 srcset for best mobile performances
- Lorem ipsum
- Dolor sit amet
- Consectetur adipiscing elit
- A colorful parrot!
Also some plain text!
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo.Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est
Installation & Usage
- include js/lc-micro-slider.min.js file
- include a theme (eg. themes/default_theme.css)
- initialize plugin targeting one/multiple properly composed page elements
NB: first parameter may be a textual selector or a DOM object (yes, also jQuery objects)
Few notes anout the HTML structure:
- the target element must contain a UL list. Each list element will be a slide
- is suggested to use the “data-type” attribute. Possible values: image, video, iframe, mixed
Can be globally defined using *fixed_slide_type* option - the “data-img” or “data-srcset” attribute defines slide’s background and is lazyloaded
- A colorful parrot!
- Cat's eyes
-
-
-
Also some plain text!
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo.
Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est
Options
Here are listed available options with default values
new lc_micro_slider('#slider_wrap', {
// (string) sliding effect / none - slide - fade - fadeslide - zoom-in - zoom-out
slide_fx : 'fadeslide',
// (string) CSS animation easing to use / ease - linear - ease-in (etc) [supports also cubic-bezier]
slide_easing : 'ease',
// (bool) shows navigation arrows
nav_arrows : true,
// (bool) shows navigation dots
nav_dots : false,
// (bool) whether to add slideshow commands (play/pause)
slideshow_cmd : true,
// (bool) whether to use carousel navigation
carousel : true,
// (bool) whether to enable touch navigation
touchswipe : true,
// (bool) whether to autostart slideshow
autoplay : false,
// (int) animation timing in millisecods / 1000 = 1sec
animation_time : 700,
// (int) interval time of the slideshow in milliseconds / 1000 = 1sec
slideshow_time : 5000,
// (bool) whether to pause and restart slideshow on hover
pause_on_hover : true,
// (bool) whether to pause slideshow on HTML video play
pause_on_video_play : false,
// (string) extra HTML code to be injected in the slider to add further commands
extra_cmd_code : '',
// (string) defines a fixed slide type fallback. Is overrided by speific data-type attribute. Possible values: image, video, iframe, mixed
fixed_slide_type : '',
// (string) loading animation HTML code
loader_code : '',
// (array) additional classes attached to the slider wrapper. Use it also to define the attached theme
addit_classes : [],
});
Mixing themes
You can use multiple themes in the same page. Be sure to prefix every theme’s CSS rule with the class you will use.
For example .lcms_light_theme and .lcms_dark_theme
Let's get in touch!
Features list