- Overview
- Documents
Strip is a Lightbox that only partially covers the page. This is less intrusive and leaves room to interact with the page on larger screens while giving smaller mobile devices the classic Lightbox experience.
sex shop sex shop sex shop sex shop sex shop seks shop spanish fly psikolog sohbet numara sohbet hatti
Source: stripjs.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" type="text/css" href="/css/strip/strip.css"/> <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="/js/strip/strip.min.js"></script>
2. HTML
The most basic way to use Strip is by adding the class strip to a link:
<a href="image.jpg" class="strip">Show image</a>
A caption can be added using the data-strip-caption attribute:
<a href="image.jpg" class="strip" data-strip-caption="Caption below the image">Caption</a>
Or customize Strip by putting options on the data-strip-options attribute:
<a href="http://vimeo.com/32071937" class="strip" data-strip-options="side: 'top', maxWidth: 800">Options</a>
Groups
Create groups by giving links a data-strip-group attribute with a unique name:
<a href="image1.jpg" class="strip" data-strip-group="mygroup">Image 1</a> <a href="image2.jpg" class="strip" data-strip-group="mygroup">Image 2</a>
The data-strip-group-options attribute can be used to set options for all items in the group:
<a href="image1.jpg" class="strip" data-strip-group="shared-options" data-strip-group-options="loop: true">This group</a> <a href="image2.jpg" class="strip" data-strip-group="shared-options">has shared options</a>
Youtube
Youtube videos are embedded using the Youtube Player API.
<a href="http://www.youtube.com/watch?v=c0KYU2j0TM4" class="strip">Youtube</a>
Options can be set using the youtube option, see YouTube Embedded Players and Player Parameters for all the available options.
<a href="http://www.youtube.com/watch?v=5XD2kNopsUs" class="strip" data-strip-options=" width: 853, height: 480, youtube: { autoplay: 0 } ">Youtube - Dimensions and options</a>
Vimeo
Strips embeds Vimeo videos using the Vimeo Player API.
<a href="http://vimeo.com/32071937" class="strip">Vimeo</a>
Options can be set using the vimeo option, see Vimeo Player Embedding for all the available options.
<a href="http://vimeo.com/36897783" class="strip" data-strip-options=" vimeo: { autoplay: 0, portrait: 1 } ">Vimeo - Options</a>
Media types
Strip attempts to automatically detect the media type using the given url. The type can also be set to image, youtube or vimeo manually using the data-strip-type attribute. This won't be required most of the time, it will be required in cases where Strip cannot detect a type based on the url:
<a href="/images/?id=24" class="strip" data-strip-type="image">Image</a>
3. API
The API allows Strip to be used with just Javascript, as an alternative to using the strip class on links.
Strip.show()
A single item can be shown by giving Strip.show() a url:
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' } });
Groups
Groups can be shown by giving Strip.show() an array with multiple items:
// 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'], { maxWidth: 400 });
Open Strip at a specific position by setting a number as the last argument:
Strip.show(['image1.jpg', 'image2.jpg'], 2);
Links
Links that use the strip class can also be opened by passing Strip.show() an element:
Strip.show($('#elementid')[0]);
Strip.hide()
Close Strip at any time by calling Strip.hide():
Strip.hide();
Strip.disable()
Disables Strip. When disabled, links using the strip class will no longer open Strip but work as regular links. Calls to Strip.show() will use a fallback to make them behave like regular links.
Strip.disable();
Use Strip.fallback(false) should you need to disable this fallback as well:
Strip.fallback(false).disable();
Strip.enable()
Enabled Strip if it was previously disabled.
Strip.enable();
Strip.fallback()
When Strip is disabled it will fallback to making Strip.show() calls open as regular links. By disabling this fallback API calls will do nothing at all.
Strip.fallback(false);
Strip.setDefaultSkin()
Sets the name of the default skin, this skin will be used when no skin option is provided.
Strip.setDefaultSkin('custom');
4. OPTIONS
-
afterPosition
A function to call after the position changed. The first argument is the current positionwithin the group.
afterPosition: function(position) { alert("You've reached position " + position); }
-
afterHide
A function to call after Strip is fully hidden.
afterHide: function() { alert('Strip is no longer visible'); }
-
effects
Sets the duration of individual effects, or disables them when set to false.
effects: 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 } }
Note: Effects are always disabled on Internet Explorer 8 for performance reasons. -
loop
When set to true a group becomes a loop, making it possible to move between the first and last item:
loop: true
-
maxHeight
Sets a maximum height for the content.
maxHeight: 500
-
maxWidth
Sets a maximum width for the content.
maxWidth: 500
-
onShow
A function to call when Strip comes into view.
onShow: function() { alert('Strip is visible'); }
-
overlap
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.
overlap: false
Note: Vimeo and Youtube always have overlap: false because overlapping buttons could otherwise prevent interaction with the video. -
position
Show or hide the position indicator.
position: false
-
preload
Sets the items to preload before and after the current item, or disables preloading when set to false.
preload: [1,2] // preload 1 before and 2 after
preload: false // disables preloading
-
side
Set the side to position Strip on to top, bottom, left or right.
side: 'top'
-
skin
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 strip.
skin: 'custom'
Note: See the skins section for details on creating custom skins. -
vimeo
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 }
-
youtube
Sets 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 }
5. SKINS
Custom skins can be added by copying the existing default skin called strip, rename it and modify it to your needs. It's recommended to do this in a separate css file so that strip.csscan be upgraded without losing anything.
Once you have a skin in place it can be used with the skin option:
skin: 'custom'
Default options
Default options can be provided for a skin by extending Strip.Skins with options for your custom skin:
$.extend(Strip.Skins, { 'custom': { loop: true } });
Changing the default skin
The default skin can be changed using Strip.setDefaultSkin()
Strip.setDefaultSkin('custom');