_______________________ LightUp README _______________________ What is this funky jazz? ------------------------ LightUp is a simple, easy, responsive lightbox to be used with jQuery (1.11). Who's this for? --------------- This plugin was created by Aaron Cooper for unlimited use EXCLUSIVELY for Cybacat Ltd and for any sites they produce for other businesses/clients. How do I use it? ---------------- -- Setting up the HTML -- 1. Include lightup.css and jquery.lightup.js in your html/php page. The css file can go anywhere, but ideally above your main stylesheet. The js file HAS to come after jQuery. 2. This plugin works on galleries of images best, that is- a container HTML element with images inside it, regardless of how many images you have (1 or more). The images MUST be placed inside a link, or the link must have the background image set to the thumbnail image you want to show. You MUST also fill the tag's href attribute with the source image. This is what the plugin uses to refer to the full-size image, and works as a fallback if javascript is disabled. 3. The container HTML element must have a class of lightup. The children tags can have any class, doesn't matter. -- Setting up the jQuery -- (this all goes inside your init.js, main.js or wherever all your js is situated) 1. After doing the above steps and including the lightup jquery file, use this syntax to bind lightup to all your galleries on a page: var options = { itemCont: '.lightup-item-cont', // css selector for the item container - this should be the elements that sit alongside each other item: '.lightup-item' // css selector for the thumbnail item (the element) }; $('.lightup-gallery').each(function(){ $(this).lightUp(options); }); 2. Boom! You're good to go. Either pass options to .lightUp(), or don't. The above specified options are defaults anyway, so if you're happy with them and happy to apply those classes to your HTML then it'll work without options. Example HTML: ------------- (note: the "thumbnail-container" div isn't absolutely necessary, just showing how you can have the tags nested inside a container element of it's own, if you so desire) Example using PHP as well: -------------------------- Exact same setup as above, just using PHP to loop through your gallery images Also worth noting: ------------------ Currently this plugin only works to display one image at a time and doesn't support next/prev buttons for scrolling through images in the gallery to keep things simple and lightweight. You will also notice warnings or outright errors in your browser console log if jQuery isn't included or if you've used a version that's older than 1.11 or newer than 1.xx (i.e. jQuery 2.xx). Cybacat RULES!