A repository of over 1000 quality jQuery plugins

jQuery Stupidbox

Stupidbox is a jQuery Dialogs / Lightboxes plugin.

Created by Starikovs

Really simple image lightbox jQuery plugin. Demo is here http://codepen.io/starikovs/full/vNEvpW/

Not what you're looking for? Click here to view more Dialogs / Lightboxes jQuery plugins

stupidbox

This is a really simple and a bit stupid image lightbox jQuery plugin. It has no options and works out of the box. It just a javascript jquery.stupidbox.js file with no styleshets, images, etc.

And again, all you need is jquery.stupidbox.js (it's around 30 lines of code).

Demo

Demo on CodePen

HTML

The idea of this markup is that <a> tag has a big image and <img> has a thumbnail.

<a href="big-image.jpg">
    <img src="thumbnail-image.jpg">
</a>

Or you can use just <img> tag. In this case, you will get the same image in the lightbox.

<img src="image.jpg">

Javascript

jQuery(function ($) {
    $("a").stupidbox();
});

Or:

jQuery(function ($) {
    $("img").stupidbox();
});

BTW

We stretch image in the lightbox to full screen keeping aspect ratio, so it's recommended to use high quality images for "big image".



You might also like these other Dialogs / Lightboxes jQuery Plugins

  • interceptjs

    jQuery Plugin to Handle ‘Call to Action’ Intercepts

  • marginotes

    Quick, cool margin notes with jQuery

  • MediumLightbox

    Nice and elegant way to add zooming functionality for images, inspired by medium.com

License:

The MIT License (MIT)