Giter VIP home page Giter VIP logo

jquery-lightbox's Introduction

jQuery Lightbox

Lightboxes are a way to display an image on the same page simply and elegantly.

NO LONGER MAINTAINED, USE FANCYBOX INSTEAD.

Usage

Refer to the demo for usage instructions

Options

Name: show_helper_text
Description: Should we show the helper text / hint ("Click to close, Hover to interact")
Values:
  true (default)       - Yes
  false                - No

Name: show_info
Description: Should we force the show of the image information?
Values:
  "auto" (default)     - It should be handled automatically on rollover
  true                 - It should be forced to show

Name: show_extended_info
Description: Should we force the show of the extended image information?
Values:
  "auto" (default)     - It should be handled automatically on rollover
  true                 - It should be forced to show

Name: download_link
Description: Should we show the image download link?
Values:
  true (default)       - Yes
  false                - No

Name: auto_resize
Description: Should we auto resize the image if it is too big?
Values:
  true (default)       - Yes
  false                - No

Name: colorBlend
Description: Should we support colorBlend?
Values:
  null (default)       - Enabled only if colorBlend is already detected
  true                 - Include colorBlend and enable
  false                - Don't support colorBlend

Name: ie6_support
Description: Should we support IE6
Values:
  true (default)       - Support IE6
  false                - Ignore IE6

Name: show_linkback
Description: Show or hide the linkback up the top right corner
Values:
  true (default)       - Show the linkback
  false                - Hide the linkback

Name: auto_scroll
Description: How should scrolling be handled?
Values:
  "follow" (default)   - Scroll with the user
  "disabled"           - Don't allow scrolling
  "ignore"             - Don't care for scrolling (leave lightbox at original position)

Name: speed
Description: The total amount of milliseconds it takes to perform transitions between images.
Values:
  400 (default)        - Take 400 milliseconds
  integer              - Amoung in milliseconds

Name: baseurl
Description: The baseurl to use to auto include the required files
Values:
  null (default)       - Autodetect
  string               - A string of the manual baseurl to use

Name: files
Description: The javascript object that contains the locations of the requred files, used if you have renamed files.
Children: js.lightbox, js.colorBlend, css.lightbox, images.prev, images.next, images.blank, images.loading

Name: text
Description: The javascript object that contains the text of various parts of the interface, used if you want to do translations.
Children: image, of, close, closeInfo, download, help.close, help.interact, about.text, about.title, about.link

Name: keys
Description: The javascript object that contains the key allocations for shortcuts, used if you want to remap the shortcuts
Children: close, prev, next

Name: opacity
Description: The opacity of the overlay
Values:
  0.9 (default)        - 90% opacity
  decimal value        - opacity percentage in decimal form

Name: padding
Description: The padding around the image, if you are using a custom padding you want to adjust this
Values:
  null (default)       - Autodetect
  integer              - the integer amount of the padding

Name: rel
Description: What to look for in the rel tag of links and images to detect if it should have a lightbox
Values:
  "lightbox" (default) - Look for rel="lightbox" by default
  string               - What to lookfor

Name: auto_relify
Description: Should we do an initial rel scan to automatically detect lightboxes?
Values:
  true (default)       - Yes we should
  false                - No we shouldn't

How to apply options?

There are two methods, one is through the link form, and the other is through the constructor. Use the below examples to derive how it is used to hide the linkback, and translate "Image" to "Photo".

Link method

<script type="text/javascript" src="http://www.yoursite.com/some/where/jquery-lightbox/scripts/jquery.lightbox.min.js?show_linkback=false&amp;text.image=Photo"></script>

Constructor method

<script type="text/javascript" src="http://www.yoursite.com/some/where/jquery-lightbox/scripts/jquery.lightbox.min.js"></script>
<script type="text/javascript">$(function(){
	$.Lightbox.construct({
		"show_linkback":	false,
		"text": {
			// For translating
			"image":		"Image",
			"of":			"of",
			"close":		"Close X",
			"closeInfo":	"You can also click anywhere outside the image to close.",
			"download":		"Download.",
			"help": {
				"close":	"Click to close",
				"interact":	"Hover to interact"
			},
			"about": {
				"text": 	"jQuery Lightbox Plugin (balupton edition)",
				"title":	"Licenced under the GNU Affero General Public License.",
				"link":		"http://www.balupton.com/projects/jquery-lightbox"
			}
		}
	});
});</script>

Usage

Refer to the demo for usage instructions

History

You can discover the history inside the History.md file

License

Licensed under the MIT License
Copyright © 2007-2011 Benjamin Arthur Lupton

Thanks

jquery-lightbox's People

Contributors

balupton avatar

Stargazers

Olof avatar

Watchers

James Cloos avatar Olof avatar

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.