Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Script gadina dizaina.

Parašė 111111· 2011 Bir. 10 10:06:08
#3


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>
<script type="text/javascript">
 
$(document).ready(function() {
 
	$(".paging").show();
	$(".paging a:first").addClass("active");
	var imageWidth = $(".window").width();
	var imageSum = $(".image_reel img").size();
	var imageReelWidth = imageWidth * imageSum;
	$(".image_reel").css({'width' : imageReelWidth});
	rotate = function(){	
		var triggerID = $active.attr("rel") - 1;
		var image_reelPosition = triggerID * imageWidth;
		$(".paging a").removeClass('active');
		$active.addClass('active');
		$(".image_reel").animate({ 
			left: -image_reelPosition
		}, 500 );
	}; 
	rotateSwitch = function(){		
		play = setInterval(function(){
			$active = $('.paging a.active').next();
			if ( $active.length === 0) {
				$active = $('.paging a:first'); //go back to first
			}
			rotate();
		}, 3000);
	};
 
	rotateSwitch();
	$(".image_reel a").hover(function() {
		clearInterval(play);
	}, function() {
		rotateSwitch();
	});	
	$(".paging a").click(function() {	
		$active = $(this);
		clearInterval(play);
		rotate();
		rotateSwitch();
		return false;
	});
});
 
 
</script>


Sitoki scripta naudoju jis yra faile. Theme.php tiesiog nurodau kelia iki jo.