Coder Social home page Coder Social logo

lightbox2's Introduction

Lightbox2 FTW

#FTW = Fit To Window

Lightbox2 has this major flaw, where it will happily load an image that's larger than the viewable area of the browser. The user is forced to scroll around to see the whole image, and to close the dialog. For such a great plugin, that's a pretty serious oversight.

Well, "no more," I say.

Lightbox2 FTW Edition is the latest version of Lightbox2 PLUS it automatically resizes your images to fit them within the bounds of the browser window.


I prefer Lightbox2 to just about every other clone.

They've all got their bells and whistles, but I so rarely need any of that extra stuff. All those features and options come at the cost of loading time, and, of course, more code means a higher chance of bugs.


TODO:

  • resize lightbox on window resize
  • check if image is larger than the window * 0.8, as opposed to the full window size
  • offer properly minified version
  • indent a little better
  • maybe add variable percentage width (currently 80% is the hardcoded value)
  • Support CoffeeScript

Original Lightbox2 - by Lokesh Dhakar | lokeshdhakar.com | twitter.com/lokeshdhakar

Information and support

For examples, downloads, and information on using Lightbox, visit the Lightbox2 homepage: http://lokeshdhakar.com/projects/lightbox2/

For personal support issues and feature requests, visit the Lightbox forums: http://lokeshdhakar.com/forums/

License

Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/

  • Free for use in both personal and commercial projects.
  • Attribution requires leaving author name, author homepage link, and the license info intact.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.