Learn how to use jQuery at the Blog

Nashville Website Designer « visit

  • Added 9 months ago
  • 49 Lines of Code shown
  • 0 Links of Interest
http://eyescreamdesign.com
This is my Source Code and I don't want to show it here
View Source Code only (as overlay)
// That code snippet belongs to Nashville Website Designer - http://eyescreamdesign.com

$(document).ready(function() {
   //alert('hello');
   var int = 1;
   var bottom = 1;
   var top = 9;
   
   $("#right").click(function () { 
	  //var affectthis = "[li@rel=" + int + "]";
		if(int < top) {
			var affectthis = "#slide" + (int);
			var affectthisbefore = "#slide" + (int) + " > img";
			var affectthisafter = "#slide" + (int+1) + " > img";
			//alert(affectthis);
			//$(affectthis).addClass('slideLeft', 'slow');
			$(affectthis).animate({
				left: -780
				}, 1000);
			$(affectthisbefore).animate({
				opacity: .65
				}, 1500);
			$(affectthisafter).animate({
				opacity: 1.0
				}, 1500);
			int = int + 1;
		 }
	});
   
   $("#left").click(function () { 
	  //var affectthis = "[li@rel=" + int + "]";
		if(int > bottom) {
			var affectthis = "#slide" + (int-1);
			var affectthisbefore = "#slide" + (int-1) + " > img";
			var affectthisafter = "#slide" + (int) + " > img";
			//alert(affectthis);
			//$(affectthis).addClass('slideLeft', 'slow');
			$(affectthis).animate({
				left: 0
				}, 1000);
			$(affectthisbefore).animate({
				opacity: 1.0
				}, 1500);
			$(affectthisafter).animate({
				opacity: .65
				}, 1500);
			int = int - 1;
		 }
	});

 });