使用方法
在HTML文件中引入。
<linkhref="src/strip.css"rel="stylesheet">
<scriptsrc="//code.jquery.com/jquery.min.js"></script>
<scriptsrc="src/strip.min.js"></script>
HTML结构
<ahref="images/large/1.jpg"data-strip-caption="Imagecaptionhere"data-strip-group="gallery-name">
<imgsrc="images/thumb/1.jpg">
</a>
<ahref="images/large/2.jpg"data-strip-caption="Imagecaptionhere"data-strip-group="gallery-name">
<imgsrc="images/thumb/2.jpg">
</a>
<ahref="images/large/3.jpg"data-strip-caption="Imagecaptionhere"data-strip-group="gallery-name">
<imgsrc="images/thumb/3.jpg">
</a>
配置参数
effects:{//Setsthedurationofindividualeffects,ordisablesthemwhensettofalse.
spinner:{
show:200,
hide:200
},
transition:{
min:175,
max:250
},
ui:{
show:0,
hide:200
},
window:{
show:300,
hide:300
}
},
maxWidth:500,//Setsamaximumwidthforthecontent.
maxHeight:500,//Setsamaximumheightforthecontent.
hideOnClickOutside:!0,//hideOnClickOutsideHideStripwhenclickingoutsideofitoranelementthatcouldopenit,enabledbydefault.
keyboard:{//keyboardEnableordisableindividualkeyboardbuttonsorallofthemwhensettofalse.
left:!0,
right:!0,
esc:!0
},
loop:!0,//Whensettotrueagroupbecomesaloop,makingitpossibletomovebetweenthefirstandlastitem
overlap:!0,//overlapAllowsbuttonstooverlapthecontentwhensettotrue,whichisthedefault.Disablingoverlapwillcausebuttonstobepositionedoutsideofthecontent.
preload:[1,2],//Setstheitemstopreloadbeforeandafterthecurrentitem,ordisablespreloadingwhensettofalse.
position:!0,//Showorhidethepositionindicator.
side:"right",//sideSetthesidetopositionStripontotop,bottom,leftorright.
vimeo:{//vimeoSetstheplayerparametersofaVimeovideo,availableoptionscanbefoundintheVimeo
autoplay:1,
api:1,
title:1,
byline:1,
portrait:0,
loop:0
},
youtube:{//SetstheplayerparametersofaYoutubevideo,availableoptionscanbefoundintheYoutube
autoplay:1,
controls:1,
enablejsapi:1,
hd:1,
iv_load_policy:3,
loop:0,
modestbranding:1,
rel:0,
vq:"hd1080"
},
skin:'strip',//Setstheskin.Ifyou'veprovideddefaultoptionsforthisskinthey'llbeappliedasastartingpointforotheroptions.
afterPosition://Afunctiontocallafterthepositionchanged.Thefirstargumentisthecurrentpositionwithinthegroup.
afterHide://AfunctiontocallafterStripisfullyhidden.
onShow://AfunctiontocallwhenStripcomesintoview.
如果您觉得本文的内容对您的学习有所帮助:
关键字:
jquery