Strip.js is a simplified view that covers the page only partially. This leaves room for page interaction on larger screens while giving smaller devices the classic Lightbox experience.
responsive lightbox jquery, responsive lightbox image gallery jquery, image slider with lightbox popup, responsive grid gallery with lightbox popup and tag filter
Features:
- Displays a gallery of images in a simplified view with controls such as a slider.
- It is fully responsive and works well on mobile devices.
- Supports Youtube/Vimeo photos and videos.
- Lots of options to create your own patterns.
How to make use of it:
1. Include the newest model of jQuery library and the strip.min.js script on the backside of your internet web page.
<link rel="stylesheet" href="/path/to/dist/css/strip.css" /> <script src="/path/to/cdn/jquery.min.js"></script> <script src="/path/to/dist/js/strip.pkgd.min.js"></script>
2. Insert a group of photos (and/or Youtube/Vimeo movies) into your internet web page.
<a href="images/large/1.jpg" class="strip" data-strip-caption="Image caption here" data-strip-group="gallery-name"> <img src="images/thumb/1.jpg"> </a> <a href="images/large/2.jpg" class="strip" data-strip-caption="Image caption here" data-strip-group="gallery-name"> <img src="images/thumb/2.jpg"> </a> <a href="images/large/3.jpg" class="strip" data-strip-caption="Image caption here" data-strip-group="gallery-name" data-strip-group-options="loop: false, maxWidth: 500"> <img src="images/thumb/3.jpg"> </a> <a href="http://www.youtube.com/watch?v=" class="strip" data-strip-options=" width: 853, height: 480, youtube: { autoplay: 0 } " >Youtube Video</a> <a href="http://vimeo.com" class="strip">Vimeo</a>
3. The plugin will auto be initialized on doc prepared.
// Sets the duration of individual effects, or disables them when set to false. effects: { spinner: { show: 200, hide: 200 }, transition: { min: 175, max: 250 }, ui: { show: 0, hide: 200 }, window: { show: 300, hide: 300 }, }, // Hide the lightbox on click outside hideOnClickOutside: true, // Enable or disable individual keyboard buttons or all of them when set to false. keyboard: { left: true, right: true, esc: true, }, // Infinite Loop loop: true, // Allows buttons to overlap the content. // Disabling overlap will cause buttons to be positioned outside of the content. overlap: true, // Sets the items to preload before and after the current item, or disables preloading when set to false. preload: [1, 2], // Show or hide the position indicator. position: true, // Skin name skin: "strip", // top, bottom, left or right side: "right", // Show loading spinner spinner: true, // Clicking elements will toggle Strip, this behavior can be disabed by setting toggle to false. // Doing so will keep Strip open even if an element is clicked twice. toggle: true, // delay in ms uiDelay: 3000, // Vimeo player options vimeo: { autoplay: 1, api: 1, title: 1, byline: 1, portrait: 0, loop: 0, }, // Youtube player options youtube: { autoplay: 1, controls: 1, enablejsapi: 1, hd: 1, iv_load_policy: 3, loop: 0, modestbranding: 1, rel: 0, vq: "hd1080", }, // initial options initialTypeOptions: { image: {}, vimeo: { width: 1280, }, // Youtube needs both dimensions, it doesn't support fetching video dimensions like Vimeo yet. // Star this ticket if you'd like to get support for it at some point: // https://code.google.com/p/gdata-issues/issues/detail?id=5329 youtube: { width: 1280, height: 720, }, }, // callbacks afterPosition: function(position) { console.log("You've reached position " + position); }, afterHide: function() { console.log('Strip is no longer visible'); }, onResize: function(fxProperty, fxValue, side) { console.log(fxProperty, fxValue, side); // logs: 'width', 0, 'right' when starting the animation // and adjusts fxValue for each step in the animation }, onShow: function() { console.log('Strip is visible'); },
4. API strategies.
// show a single item Strip.show("1.jpg"); Strip.show({ url: "1.jpg", caption: "Image caption", }); Strip.show({ url: "http://vimeo.com/3237", options: { side: "top", // more options here }, }); // show groups Strip.show(["1.jpg", "2.jpg"]); Strip.show([ { url: "1.jpg", caption: "Image caption 1" }, { url: "2.jpg", caption: "Image caption 2" }, ]); Strip.show(["1.jpg", "2.jpg"], { // options here }); // open Strip at a specific position Strip.show(["1.jpg", "2.jpg"], 2); // open links Strip.show($("#elementid")[0]); // hide Strip.hide(); // disable Strip.disable(); // disable fallback Strip.fallback(false); // enable Strip.enable(); // set theme Strip.setDefaultSkin("custom");
Javascript API
The API allows Strip to be used with Javascript, as an alternative to using the strip
class on links.
Method | |
---|---|
| A single item can be shown by giving Strip.show("image.jpg"); Add a caption by using an object instead: Strip.show({
url: "image.jpg",
caption: "Caption for this image",
}); This object also accepts options to customize Strip: Strip.show({
url: "http://vimeo.com/32071937",
options: {
side: "top",
},
}); GroupsGroups can be shown by giving // use urls
Strip.show(["image1.jpg", "image2.jpg"]);
// or objects
Strip.show([
{ url: "image1.jpg", caption: "Caption for this image" },
{ url: "image2.jpg", caption: "Another caption" },
]); Options for the entire group can be set using the second argument: Strip.show(["image1.jpg", "image2.jpg"], {
loop: false,
maxWidth: 500,
}); Open Strip at a specific position by setting a number as the last argument: Strip.show(["image1.jpg", "image2.jpg"], 2); LinksLinks that use the strip class can also be opened bypassing Strip.show($("#elementid")[0]); |
| Close Strip at any time by calling Strip.hide(); |
| Disables Strip. When disabled, links using the Strip.disable(); Use Strip.fallback(false).disable(); |
| Enable Strip if it was previously disabled. Strip.enable(); |
| When Strip is disabled it will fall back to making Strip.fallback(false); |
| Sets the name of the default skin, this skin will be used when no Strip.setDefaultSkin("custom"); |
Options
Option | |
---|---|
| Sets the duration of individual effects, or disables them when set to false.
These are all available effects: effects: {
spinner: { show: 200, hide: 200 },
transition: { min: 175, max: 250 },
ui: { show: 0, hide: 200 },
window: { show: 300, hide: 300 }
} |
| Hide Strip when clicking outside of it or an element that could open it, enabled by default.
|
| Enable or disable individual keyboard buttons or all of them when set to false.
Or use an object to toggle individual buttons: keyboard: {
left: true,
right: true,
esc: false
} Note: |
| When set to true a group becomes a loop, making it possible to move between the first and last item:
|
| Sets a maximum height for the content.
|
| Sets a maximum width for the content.
|
| Allows buttons to overlap the content when set to true, which is the default. Disabling overlap will cause buttons to be positioned outside of the content.
Note: Vimeo and Youtube always have |
| Show or hide the position indicator.
|
| Sets the items to preload before and after the current item, or disables preloading when set to false.
|
| Set the side to position Strip on to
|
| Sets the skin. If you’ve provided default options for this skin they’ll be applied as a starting point for other options. The default skin is
|
| Disables the loading icon when set to false.
|
| Clicking elements will toggle Strip, this behavior can be disabled by setting
Note: |
| Sets the player parameters of a Vimeo video, available options can be found in the Vimeo documentation: Vimeo Player Embedding. vimeo: {
autoplay: 1,
title: 1,
byline: 1,
portrait: 0,
loop: 0
} |
| youtubeSets the player parameters of a Youtube video, available options can be found in the Youtube documentation: YouTube Embedded Players and Player Parameters. youtube: {
autohide: 1,
autoplay: 1,
controls: 1,
enablejsapi: 1,
hd: 1,
iv_load_policy: 3,
loop: 0,
modestbranding: 1,
rel: 0
} |
Callbacks
Callbacks can be used alongside other Options.
Callback | |
---|---|
| A function to call after the position changes. The first argument is the current position within the group. afterPosition: function(position) {
console.log("You've reached position " + position);
} |
| A function to call after Strip is fully hidden. afterHide: function() {
console.log('Strip is no longer visible');
} |
| This callback allows you to respond to Strip as it’s resizing and make adjustments to your page. You could for example slide your page along or adjust margins. The parameters of onResize give you everything needed to make these adjustments. onResize: function(fxProperty, fxValue, side) {
console.log(fxProperty, fxValue, side);
// logs: 'width', 0, 'right' when starting the animation
// and adjusts fxValue for each step in the animation
}
|
| A function to call when Strip comes into view. onShow: function() {
console.log('Strip is visible');
} |
Responsive Sliding Lightbox Plugin with jQuery, Strip JS Plugin/Github, responsive lightbox image gallery jquery free download, jquery slider with image lightbox popup
See Demo And Download
Official Website(staaky): Click Here
This superior jQuery/javascript plugin is developed by staaky. For extra advanced usage, please go to the official website.
Be First to Comment