w pierwotnej wersji, jedynym skryptem js, ktory byl podpiety pod strone, byl lightbox. w momencie, kiedy podpialem jsquery i wykorzystalem funkcje do rotacji grafik, dziala tylko jeden skrypt. Dezaktywacja ktoregos z nich, pozwala na funkcjonowanie drugiemu.
Funkcja korzystajaca z jsquery:
KOD
function slideSwitch() {
var $active = $('#sponsorzyRight IMG.active');
if ( $active.length == 0 ) $active = $('#sponsorzyRight IMG:last');
var $next = $active.next().length ? $active.next() : $('#sponsorzyRight IMG:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 3000 );
});
var $active = $('#sponsorzyRight IMG.active');
if ( $active.length == 0 ) $active = $('#sponsorzyRight IMG:last');
var $next = $active.next().length ? $active.next() : $('#sponsorzyRight IMG:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 3000 );
});
Kod lightboxa chyba nie wymaga prezentacji.
Będe wdzięczny za pomoc!