This time I will share jQuery Plugin and tutorial about Modern and Flexible jQuery Lightbox Plugin – Vanillabox, hope it will help you in programming stack.
Vanillabox is a simple jQuery plugin for creating clean and skinable lightbox effects with a little bit codes.
Features:
- Small and easy to use
- Supports images, grouped images, web page, iframe, etc
- Keyboard and arrows navigation
- Closeable fullscreen overlay
- Flexible and responsive design for desktop and mobile
- Free for personal and commercial use.
- 4 pre-defined themes: bitter, bitter frame, sweet and sweet frame
Basic Usage:
1. Include the jQuery javascript library and jQuery Vanillabox plugin on your web page
2 |
< script type = "text/javascript" src = "vanillabox/vanillabox.js" ></ script > |
2. Include a theme css file on the web page
1 |
< link rel = "stylesheet" href = "vanillabox/theme/bitter/vanillabox.css" > |
3. Create a group of images
1 |
< ul id = "grouped-image-list" > |
2 |
< li >< a href = "1.jpg" title = "Title 1" >Image 1</ a ></ li > |
3 |
< li >< a href = "2.jpg" title = "Title 2" >Image 2</ a ></ li > |
4 |
< li >< a href = "3.jpg" title = "Title 3" >Image 3</ a ></ li > |
5 |
< li >< a href = "4.jpg" title = "Title 4" >Image 4</ a ></ li > |
4. The javascript. (With default options)
1 |
$( '#grouped-image-list a' ).vanillabox(); |
5. Options
01 |
$( '#grouped-image-list a' ).vanillabox({ |
Basic Usage:
v0.1.7 (2015-10-27)
- Fixed iframe content that requires fullscreen
- Adopted modern JavaScript syntax
2015-10-26
- Add ‘allowfullscreen’ attribute to iframe element
2014-05-31
2014-05-22
- Add ‘dispose’ option and fix related bugs
v0.1.4 (2013-12-13)
- Add adjustToWindow option
v0.1.1 (2013-12-01)
- Fixed a bug of event handling
This awesome jQuery plugin is developed by cocopon. For more Advanced Usages, please check the demo page or visit the official website.