Welcome!
emloSlightBox is an improved version of the popular Lightbox. It can effectively open images, HTML content, maps, movies and even more.
Look, I am plain text. You can select me if you want.
And this is image:
emloSlightBox is an improved version of the popular Lightbox. It can effectively open images, HTML content, maps, movies and even more.
emloSlightbox is easy to use and does not require configuration - just copy, paste and have fun. But if you do not like the default configuration, you can easily adjust all the options - change the animation speed and slices number, group elements, call functions such as onStart, onComplete, onClose and many more.
Enhance your website by adding a unique and attractive snippet!
On this website I will show you how to use emloSlightBox.
<a href="big-image.jpg" title="full caption" class="emloSlightBox"><img src="small-image.jpg" alt="thumb caption"></a> <script> $('a.emloSlightBox').emloSlightBox(); </script>
<a href="big-image.jpg" title="full caption" class="emloSlightBox">anchor</a> <script> $('a.emloSlightBox').emloSlightBox(); </script>
set ID of hidden layer in href attribute
<div id="inlinehtml">some content in hidden layer</div> <a href="#inlinehtml" class="emloSlightBox">anchor</a> <script> $('a.emloSlightBox').emloSlightBox(); </script>
example:
set data attribute as type="ajax"
<a href="external.html" data-type="ajax" class="emloSlightBox">anchor</a> <script> $('a.emloSlightBox').emloSlightBox(); </script>
example: external.html file loaded with AJAX
Just add title attribute.
<a title="Our office" href="href" class="emloSlightBox">anchor</a> <script> $('a.emloSlightBox').emloSlightBox({verticalSlices: 1, horizontalSlices: 1, boxLines: 1, boxesInLine:1, showSpeed: 1); </script>
example: google maps
You can add functions to be called when emloSlightBox is being started, closed or the content is loaded.
<a href="http://www.domain.com" class="emloSlightBox">anchor</a> <script> $('a.emloSlightBox3').emloSlightBox({ onStart: function(){ alert('Welcome!'); }, onClose: function(){ alert('Goodbye.'); }, onComplete: function(){ alert('Mission completed'); } }); </script>
example: Do something!
You can set language for buttons (default: en, but you can add your own in options)
<script> $('a.emloSlightBox3').emloSlightBox({ text: { fr: { next: 'le next', prev: 'le prev', close: 'le close', play: 'le play', pause: 'le pause' }, en: { prev: 'prev', next: 'next', close: 'close', play: 'slideshow', pause: 'stop slideshow' } }, language: $('html').attr('lang') }); </script>
You can group elements to different Lightboxes - just assign them a different class
<a href="big-image.jpg" class="emloSlightBox">anchor</a> <a href="big-image.jpg" class="another-emloSlightBox">anchor</a> <script> $('a.emloSlightBox').emloSlightBox(); $('a.another-emloSlightBox').emloSlightBox(); </script>
option | description | type | posibilities | default |
---|---|---|---|---|
slideShow | start slideshow | boolean | true / false | false |
slideShowSeconds | speed of slideshow in seconds | int | 5 | |
backgroundOpacity | background opacity | float | 0-1 | .7 |
showSpeed | speed of content show | int | 400 | |
delay | delay beetween slices | int | 70 | |
outOpacity | opacity of thumb image on mouseout | float | 0-1 | .7 |
overOpacity | opacity of thumb image on mouseover | float | 0-1 | 1 |
thumbCaptionOpacitySpeed | speed of thumb opacity change | int | 400 | |
showThumbCaptionSpeed | speed of thumb caption opacity change | int | 400 | |
transitions | transitions | array | 1 ... 20 | [20, 18, 11, 13, 5, 4, 3, 1, 2, 17, 19, 16, 15, 14, 12, 10, 9, 8, 7, 6] |
shuffleTransitions | random transitions from array | boolean | true / false | true |
verticalSlices | number of vertical slices | int | 6 | |
horizontalSlices | number of horizontal slices | int | 6 | |
boxesInLine | box slices in line | int | 4 | |
boxLines | lines of box slices | int | 3 | |
language | language | string | pl, en | en |
onComplete | function which is called after the loading of the content | function |
function(){ // do something } | |
onClose | function which is called when emloSlightBox is being closed | function |
function(){ // do something } | |
onStart | function which is called when emloSlightBox is started | function |
function(){ // do something } | |
text | text for buttons | object |
{ en: { prev: 'prev', next: 'next', close: 'close', play: 'slideshow', pause: 'stop slideshow' }, pl: { prev: 'poprzednie', next: 'następne', close: 'zamknij', play: 'autoodtwarzanie', pause: 'zatrzymaj autoodwtarzanie' } } | |
backgroundClass | class name for background | string | emloSlightBoxBG | |
contentClass | class name for emloSlightBox content div | string | emloSlightBoxContent | |
thumbCaptionClass | class name for thumb caption | string | altTag | |
fullCaptionClass | class name for full caption | string | caption | |
counterClass | class name for counter | string | counter | |
closeClass | class name for 'close' button | string | close | |
prevClass | class name for 'prev' button | string | prev | |
nextClass | class name for 'next' button | string | next | |
slicesContainerClass | class name for slices container div | string | slices-container | |
sliceContentClass | class name for slice content div | string | slice-content | |
sliceClass | class name for slice | string | slice | |
playClass | class name for 'play' button | string | play | |
pauseClass | class name for 'pause' button | string | pause | |
preloaderContainerClass | class name for preloader container div | string | preloader-container | |
preloaderClass | class name for preloader | string | preloader |
If you have any questions, bugs or new ideas to improve emloSlightBox - tell me.
Please note the images (taken from: 1, 2, 3, 4, 5, 6, 7, 8, ) used in preview are for demo purpose only and are not included in the package!