slick-lightbox
Version:
[](https://cdnjs.com/libraries/slick-lightbox)
231 lines (151 loc) • 7.2 kB
HTML
<!-- Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc) -->
<html>
<head>
<title>CoffeeDoc | slick-lightbox.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" media="all" href="../../resources/base.css" />
</head>
<body>
<header>
<h1>slick-lightbox.coffee</h1>
</header>
<div class="container">
<div class="sidebar column">
<h4>Classes</h4>
<ul class="classlist">
<li><a href="#SlickLightbox">SlickLightbox</a></li>
</ul>
<h4>Functions</h4>
<ul class="functionlist">
<li><a href="#$.fn.slickLightbox">$.fn.slickLightbox</a></li>
<li><a href="#$.fn.unslickLightbox">$.fn.unslickLightbox</a></li>
</ul>
</div>
<div class="content column">
<div id="module-docstring">
<p>Slick Lightbox jQuery plugin
<a href="http://mreq.github.io/slick-lightbox/">http://mreq.github.io/slick-lightbox/</a></p>
<p>Copyright 2014-2016 mreq <a href="https://github.com/mreq">https://github.com/mreq</a></p>
<p>Released under the MIT license</p>
<p>Documentation generated by <a href="http://github.com/omarkhan/coffeedoc">CoffeeDoc</a></p>
<p><a href="http://mreq.github.io/slick-lightbox/docs/">http://mreq.github.io/slick-lightbox/docs/</a></p>
</div>
<div id="classes">
<h2>Classes</h2>
<div class="class">
<div class="header">
<a id="SlickLightbox"><h3>SlickLightbox</h3></a>
</div>
<div class="class-content">
<p>The core class.</p>
<div class="methods">
<div class="instancemethods">
<h3>Instance Methods</h3>
<div class="method">
<h4>constructor(element, @options)</h4>
<p>Binds the plugin. </p>
</div>
<div class="method">
<h4>init(index)</h4>
<p>Creates the lightbox, opens it, binds events and calls <code>slick</code>. Accepts <code>index</code> of the element, that triggered it (so that we know, on which slide to start slick). </p>
</div>
<div class="method">
<h4>createModalItems()</h4>
<p>Creates individual slides to be used with slick. If <code>options.images</code> array is specified, it uses it's contents, otherwise loops through elements' <code>options.itemSelector</code>. </p>
</div>
<div class="method">
<h4>createModal()</h4>
<p>Creates a <code>slick</code>-friendly modal. </p>
</div>
<div class="method">
<h4>initSlick(index)</h4>
<p>Runs slick by default, using <code>options.slick</code> if provided. If <code>options.slick</code> is a function, it gets fired instead of us initializing slick. Merges in initialSlide option. </p>
</div>
<div class="method">
<h4>open()</h4>
<p>Opens the lightbox. </p>
</div>
<div class="method">
<h4>close()</h4>
<p>Closes the lightbox and destroys it, maintaining the original element bindings. </p>
</div>
<div class="method">
<h4>bindEvents()</h4>
<p>Binds global events. </p>
</div>
<div class="method">
<h4>slideSlick(direction)</h4>
<p>Moves the slick prev or next. </p>
</div>
<div class="method">
<h4>detectIE()</h4>
<p>Detects usage of IE8 and lower. </p>
</div>
<div class="method">
<h4>getElementCaption(el, info)</h4>
<p>Returns caption for each slide based on the type of <code>options.caption</code>. </p>
</div>
<div class="method">
<h4>getElementSrc(el)</h4>
<p>Returns src for each slide image based on the type of <code>options.src</code>. </p>
</div>
<div class="method">
<h4>unbindEvents()</h4>
<p>Unbinds global events. </p>
</div>
<div class="method">
<h4>destroy(unbindAnchors)</h4>
<p>Destroys the lightbox and unbinds global events. If <code>true</code> is passed as an argument, unbinds the original element as well. </p>
</div>
<div class="method">
<h4>destroyPrevious()</h4>
<p>Destroys lightboxes currently in DOM. </p>
</div>
<div class="method">
<h4>getTransitionDuration()</h4>
<p>Detects the transition duration to know when to remove stuff from DOM etc. </p>
</div>
<div class="method">
<h4>writeHistory()</h4>
<p>Writes an empty state to the history API if supported. </p>
</div>
<div class="method">
<h4>filterOutSlickClones($items)</h4>
<p>Removes all slick clones from the set of elements. Only does so, if the target element is a slick slider. </p>
</div>
<div class="method">
<h4>handlePossibleCloneClick($clickedItem, $items)</h4>
</div>
<div class="method">
<h4>elementIsSlick()</h4>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="functions">
<h2>Functions</h2>
<div class="function">
<div class="header">
<a id="$.fn.slickLightbox"><h3>$.fn.slickLightbox(options)</h3></a>
</div>
<div>
<p>Fires the plugin. </p>
</div>
</div>
<div class="function">
<div class="header">
<a id="$.fn.unslickLightbox"><h3>$.fn.unslickLightbox()</h3></a>
</div>
<div>
<p>Removes everything. </p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>