pahannew,
Поправил Скрипт:
<script type="text/javascript" src="mod_win/fancy/lib/jquery-1.7.2.min.js"></script>
<!--
Thought of using jQuery UI's .addClass transitions as fallback (or primary) but doesn't work as well
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"></script>
-->
<script>
// DOM Ready
$(function() {
var current=1;
function rotate() {
// This seems like a sucky way to do it, but you can't select by classes because they execute in order
if (current == 1) {
$("#block-1").removeClass().addClass("active");
$("#block-2").removeClass().addClass("non-active-top");
$("#block-3").removeClass().addClass("non-active-bottom");
} else if (current == 2) {
$("#block-1").removeClass().addClass("non-active-bottom");
$("#block-2").removeClass().addClass("active");
$("#block-3").removeClass().addClass("non-active-top");
} else {
$("#block-1").removeClass().addClass("non-active-top");
$("#block-2").removeClass().addClass("non-active-bottom");
$("#block-3").removeClass().addClass("active");
}
}
var timeoutId;
$("#rotator div").click(function()
{
clearTimeout(timeoutId);
switchNoHandClick = false;
timeoutId=setTimeout(function(){
switchNoHandClick = true;
},23*1000);
// Enables reversing, idea via Andrea Canton: https://twitter.com/andreacanton/status/24954634279849985
current = this.id.substr(6);
rotate();
});
var switchNoHandClick = true, auto = false;
var LengBLK = $("#rotator > div[id^='block-']").length;
function AutoRotate() {
if(switchNoHandClick){
//alert(">"+current)
auto = true;
current++;
if(current > LengBLK)current=1;
rotate();
auto = false;
}
}
setInterval (function(){AutoRotate()},5000)
});
</script>
Да - Удали такую жа библиотеку ( mod_win/fancy/lib/jquery-1.7.2.min.js)
- она ниже, после коммента <!-- Add jQuery library --> ) - иначе слайдшоу - не будет работать (Я её поставил в самый верх скрипта , вместо старой -1.4.4.