Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85c674a

Browse files
committed
correction noflash and slight modification
1 parent80a4772 commit85c674a

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

‎noflash/jquery.noflash.js‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* NoFlash Responsive Slideshow jQuery Plugin
3+
* version 2.0.0
4+
* https://github.com/foo123/jquery-plugins
5+
**/
16
/*
27
Documentation
38
@@ -885,13 +890,13 @@ function NoFlash( el, options )
885890
ind[i]=i;
886891
if(self.options.controls)
887892
{
888-
varanc=$("<a class='bullet' href='#"+i+"'></a>");
893+
varanc=$("<a class='bullet' href='#"+i+"' title=\""+(i+1)+"\"></a>");
889894
controls.find(".bullets").append(anc);
890895
}
891896
}
892897
if(self.options.controls)
893898
{
894-
controls.find(".controls").append("<a class='prev' href='#");
899+
controls.find(".controls").append("<a class='prev' href='#"Previous\"></a><a class='play-pause' href='#"Play/Pause\"></a><a class='next' href='#"Next\"></a>");
895900
controls.find(".bullet").click(function(){
896901
if(paused)return;
897902
if(!mutex)self.doTransition(String(parseInt($(this).attr("rel"),10)));
@@ -943,13 +948,13 @@ function NoFlash( el, options )
943948
};
944949

945950
self.init=functioninit(){
946-
W=self.el.width();H=stdMath.ceil(W/self.options.aspectRatio);
951+
W=stdMath.round(self.el.width());H=stdMath.round(W/self.options.aspectRatio);
947952
holder=$("<div class=\"noflash-holder\"></div>");
948953
holder.css({margin:"0px",padding:"0px",border:'0',overflow:"hidden",position:"relative",top:"0px",left:"0px",width:String(W)+'px',height:String(H)+'px',"background-color":self.options.backColor||0});
949954

950955
// resize handler
951956
handlers[self.id]=function(evt){
952-
W=self.el.width();H=stdMath.ceil(W/self.options.aspectRatio);
957+
W=stdMath.round(self.el.width());H=stdMath.round(W/self.options.aspectRatio);
953958
holder.css({width:String(W)+'px',height:String(H)+'px'});
954959
thisimg.css({'background-size':String(W)+'px auto'});
955960
nextimg.css({'background-size':String(W)+'px auto'});
@@ -958,7 +963,7 @@ function NoFlash( el, options )
958963
// parse dom data
959964
self.el.children("div").each(function(){
960965
imgs.push($(this).children("img").filter(":first").css({position:"absolute",width:'100%',height:'auto'}));
961-
captions.push($(this).children("span").filter(":first").html());
966+
captions.push($(this).children("div").filter(":first").html());
962967
varthisfx={};
963968
thisfx.transition=self.options.transition;
964969
thisfx.delay=self.options.delay;
@@ -1071,7 +1076,7 @@ function NoFlash( el, options )
10711076
};
10721077

10731078
self.doTransition=functiondoTransition(dir){
1074-
vari,dd,fxi,ord,r,c,temp,ordobj,ngroups,d,o,sd,odd,animateoptions;
1079+
vari,dd,fxi,ord,r,c,temp,ordobj,ngroups,d,o,sd,del,odd,max,evtCarrier=null,animateoptions;
10751080

10761081
clearTimeout(timer);
10771082

@@ -1216,9 +1221,19 @@ function NoFlash( el, options )
12161221
d=1000*fxi.duration/(ngroups-(ngroups-1)*fxi.overlap);
12171222
o=d*fxi.overlap;
12181223
sd=d-o;
1224+
max=0;
12191225
odd=false;
12201226
animation_in_progress=true;
12211227
for(i=0;i<numpiec;i++)
1228+
{
1229+
del=ordobj.delays[i]*sd;
1230+
if(null==evtCarrier||max<=del)
1231+
{
1232+
evtCarrier=i;
1233+
max=del;
1234+
}
1235+
}
1236+
for(i=0;i<numpiec;i++)
12221237
{
12231238
temp=$.extend(true,{},$.noflashCore.transitions[fxi.transition]);
12241239
if(temp.start1&&temp.start2)
@@ -1232,7 +1247,7 @@ function NoFlash( el, options )
12321247
translate(temp.animate,p[i]);
12331248

12341249
animateoptions={duration:d,easing:fxi.easing};
1235-
if(i==p.length-1)
1250+
if(i===evtCarrier)
12361251
animateoptions.complete=function(){endTransition();};
12371252

12381253
if(fxi.transition=="zoom-fade")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp