Bonjour,

J'ai installer un diaporama,

J'ai voulut changer la taille des images à 730px mais le problème quand le diapo change d'image, on voit l'image précédente car le diaporama a été conçu pour être décalé de 690 px j'imagine..

Donc au lieu de faire -730px à chaque fois, il fait -690px du coût je me retrouve à la cinquième diapo, avec une demi slide de la précédente et l'autre demi de la suivante.


J'ai essayer tous. Je n'y arrive pas ...

Je vous poste un extrait de mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
'<div class="'+options.wrapperClass+'" style="width:730px; position:relative;"></div>')
.wrap('<div class="bx-window" style="position:relative; overflow:hidden; width:730px;"></div>')
.css({width:'999999px',position:'relative',left:'-730px'});$parent.children().css({width:'730px','float':'left',listStyle:'none'});
$outerWrapper=$parent.parent().parent();
$children.addClass('pager');}
else if(options.mode=='vertical')
{$parent.wrap('<div class="'+options.wrapperClass+'" style="width:730px; position:relative;"></div>')
.wrap('<div class="bx-window" style="width:730px; height:'+wrapperHeight+'px;
 position:relative;
 overflow:hidden;"></div>')
.css({height:'999999px',position:'relative',top:'-'+(origTop)+'px'});
$parent.children().css({listStyle:'none',height:childrenMaxHeight});
$outerWrapper=$parent.parent().parent();$children.addClass('pager');}
else if(options.mode=='fade')
{$parent.wrap('<div class="'+options.wrapperClass+'" style="width:730px; position:relative;"></div>').
 
wrap('<div class="bx-window" style="height:'+childrenMaxHeight+'px; width:730px; position:relative; overflow:hidden;"></div>');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);}
if(options.captions&&options.captionsSelector==null){$outerWrapper.append('<div class="bx-captions"></div>');}}
function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}}
function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';}
if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';}
showControls(nextType,nextContent,prevType,prevContent);}
function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;}
base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}}
base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=10;$('.pager',$outerWrapper).each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal')
 
 
{$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');}
if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);}
if(options.tickerHover){setTickerHover();}}}
function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next')
 
{$parent.animate({'left':'-=730px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate(
 
	{'left':'+=730px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate(
		{'top':'-=730px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+=730px'},speed,'linear',function()

Nom : Capture.PNG
Affichages : 91
Taille : 22,8 Ko
Voici la ligne qui ne fonctionne pas dans la classe homeslider, les valeurs sont recalculés à chaque fois qu'on change une diapo SAUF QUE Le left fait -690 à chaque fois AU LIEU de -730px