jquery-shinybox

5.1.0 • Public • Published

Shinybox

A touchable jQuery lightbox.

View project page

What is Shinybox ?

shinybox is a jQuery "lightbox" plugin for desktop, mobile and tablet.

Features

  • Swipe gestures for mobile
  • Keyboard Navigation for desktop
  • CSS transitions with jQuery fallback
  • Retina support for UI icons
  • Easy CSS customization

Compatibility

Chrome, Safari, Firefox, Opera, IE8+, IOS4+, Android, windows phone.

Usage

Javascript

Include jquery and the shinybox script in your head tags or right before your body closing tag.

<script src="lib/jquery-1.9.0.js"></script>
<script src="source/jquery.shinybox.js"></script>

CSS

Include the shinybox CSS style in your head tags.

<link rel="stylesheet" href="source/shinybox.css">

HTML

Use a specific class for your links and use the title attribute as caption.

<a href="big/image.jpg" class="shinybox" title="My Caption">

Fire the plugin

Bind the shinybox behaviour on every link with the "shinybox" class.

$(".shinybox").shinybox();

Options

id: 'shinybox-overlay', // id of the overlay element
useCSS: true, // false will force the use of jQuery for animations
 
hideCloseButtonOnMobile: false, // hide close button on mobile, you can always use swipe up or down to close the shinybox on mobile
loopAtEnd: false, // Play images in loop in either directions
 
noTitleCaptionBox: false, //  Set true if you don't have title caption box
showNavigationsOnMobile: false, // true to always show navigation icon on mobile
sort: null, // a sorting function to sort the dom elements before showing in shinybox
 
videoMaxWidth: 1140, // videos max width
autoplayVideos: false, // true will autoplay Youtube and Vimeo videos
vimeoColor: 'CCCCCC', // vimeo color
queryStringData: {}, // plain object with custom query string arguments to pass/override for video URLs
 
beforeOpen: function(){}, // called before opening
afterClose: function(){}, // called after closing
afterMedia: function(element, index){}, // called after loading media
afterSlide: function(element, index){} // called after sliding to image at the index

Credits

Photos by Daniele Zedda Based on Swipebox

Readme

Keywords

none

Package Sidebar

Install

npm i jquery-shinybox

Weekly Downloads

930

Version

5.1.0

License

none

Unpacked Size

191 kB

Total Files

18

Last publish

Collaborators

  • groupone.frank
  • adityabansal
  • aziz_tokhirjonov
  • shhone
  • skarindra
  • vsbh
  • aman8192
  • muzzamilm
  • ajithk
  • muhammedsalih
  • prateekjn
  • subhashn
  • sreekanth414
  • roshany
  • yuvrajsingh
  • utkarsh1810030
  • ankitb
  • gustavnikolaj
  • faisalk
  • suryakumar.ravi
  • adhionecom
  • pjk14
  • shashikanthvoleti
  • aashishtheone
  • alexander_soriano_one_com
  • asritha_bolla
  • jhven
  • mohamedzahan
  • abhinavsainione
  • priyadarshinishankar
  • priya.one.com
  • rohithsai18
  • josephineone
  • ankitonecom
  • raminbpr
  • drajpal
  • robinc2402
  • lusia
  • vishalr
  • janice
  • hkl
  • ocwd-infrastructure
  • juj
  • muhdaslam
  • moubi
  • abhishek_pandey
  • muqsithirfan
  • danielstryhn
  • prashantrathi
  • febinrasheed
  • paras20xx
  • sathishkategaru1
  • sepo-one
  • sebastianbn
  • rabish
  • mahesh434
  • martinerb
  • punith-mithra
  • abhisekhs
  • shdh
  • silvija_pakalniske
  • rachitj
  • rohanm1
  • kushagras
  • mab-npm
  • marcvinther
  • jmjone
  • asgerstage
  • sha_one
  • dineshk
  • ashish-tiwari-one
  • mukeshpathak70
  • norbertthebiro
  • abderra7man
  • kshone
  • mayankg052
  • mpe-appropos
  • kundank
  • autochton
  • papandreou
  • maartenwinter
  • avcs