Появилась одна загвоздка!
Все работает! Нажимаю, стиль меняется! Но этот стиль остается за этим элементом. То есть при переходе к следующему слайду - стиль новый, а нужно, что бы при переходе стиль возвращался в исходное положение.
Вот эта функция:
new Element('a').setProperties({id: 'lbAddphoto', href: '#'}).injectInside(this.bottom).onclick = this.overlay.onclick = function() {
jQuery.ajax({
type: "POST",
url: "addtempphoto.php",
data: "np="+myimg+"&pp="+myimgpath,
success: function(){
jQuery("#content").html(html);
}
});
this.setProperties({id: 'lbAddphotocs', href: '#'}).injectInside(this.bottom);
};
Переход к следующему слайду осуществляется тут:
nextEffect: function() {
switch(this.step++) {
case 1:
this.center.className = '';
this.image.setStyles({backgroundImage: 'url('+this.images[this.activeImage][0]+')', width: this.preload.width+'px'});
this.image.style.height = this.prevLink.style.height = this.nextLink.style.height = this.preload.height+'px';
this.caption.setHTML(this.images[this.activeImage][1] || '');
myimg=this.images[this.activeImage][1];
myimgpath=this.images[this.activeImage][0];
this.number.setHTML((this.images.length == 1) ? '' : 'Фото '+(this.activeImage+1)+' из '+this.images.length);
if(this.activeImage != 0) this.preloadPrev.src = this.images[this.activeImage - 1][0];
if(this.activeImage != (this.images.length - 1)) this.preloadNext.src = this.images[this.activeImage + 1][0];
if(this.center.clientHeight != this.image.offsetHeight) {
this.fx.resize.custom({height: [this.center.clientHeight, this.image.offsetHeight]});
break;
}
this.step++;
case 2:
if(this.center.clientWidth != this.image.offsetWidth) {
this.fx.resize.custom({width: [this.center.clientWidth, this.image.offsetWidth], marginLeft: [-this.center.clientWidth/2, -this.image.offsetWidth/2]});
break;
}
this.step++;
case 3:
this.bottom.setStyles({top: (this.top + this.center.clientHeight)+'px', width: this.image.style.width, marginLeft: this.center.style.marginLeft, display: ''});
this.fx.image.custom(0, 1);
break;
case 4:
if(this.options.animateCaption) {
this.fx.bottom.custom({opacity: [0, 1], height: [0, this.bottom.scrollHeight]});
break;
}
this.bottom.setStyles({opacity: '1', height: this.bottom.scrollHeight+'px'});
case 5:
if(this.activeImage != 0) this.prevLink.style.display = '';
if(this.activeImage != (this.images.length - 1)) this.nextLink.style.display = '';
this.step = 0;
}
},
Прошу помогите!