Learn how to use jQuery at the Blog

Espira Tecnologias « visit

  • Added 8 months ago
  • 63 Lines of Code shown
  • 2 Links of Interest
http://espiratecnologias.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 Espira Tecnologias - http://espiratecnologias.com

$(document).ready(function() { 
	$("a.lightbox").fancybox({ 
		'zoomSpeedIn': 300, 
		'zoomSpeedOut': 300, 
		'overlayShow': true,
		'overlayOpacity': 0.9
	});
	
	$("a#iframe.lightbox").fancybox({ 
		'zoomSpeedIn': 300, 
		'zoomSpeedOut': 300, 
		'overlayShow': true,
		'overlayOpacity': 0.9,
		'hideOnContentClick': false,
		'frameWidth': '50',
		'frameHeight': '50'
	});
		
	if ($("ul.post-gallery").children().length > 1) {
		var $_Indices = "";
		for(i=1;i<=$("ul.post-gallery").children().length;i++) {
			$_Indices += "<a href=\"javascript:;\" class=\"trigger\" id=\"item"+i+"\">"+i+"</a>";
		}
		$("ul.post-gallery").before("<p>"+$_Indices+"</p>");
		$("a.trigger").click(function() {
			$incremental = $(this).html()-1;
			$("ul.post-gallery").animate({
				left: "-"+($incremental*310)+"px"
			});
		});
		$("ul.post-gallery li").css({
			"float": "left",
			"display": "inline",
			"width": "310px",
		});
	} else if ($("ul.post-gallery").children().length == 1) {
		$(".post-gallery-wrapper").css("height", "252px");
	}
	
	if ($("ul.slider-servicios").children().length > 1) {
		var $_Indices = "";
		for(i=1;i<=$("ul.slider-servicios").children().length;i++) {
			$_Indices += "<a href=\"javascript:;\" class=\"trigger\" id=\"item"+i+"\">"+i+"</a>";
		}
		$("ul.slider-servicios").before("<p class='controls'>"+$_Indices+"</p>");
		$("a.trigger").click(function() {
			$incremental = $(this).html()-1;
			$("ul.slider-servicios").animate({
				left: "-"+($incremental*450)+"px"
			});
		});
		$("ul.slider-servicios li").css({
			"float": "left",
			"display": "inline",
			"width": "450px",
		});
	}
	
	$("a.external").click(function() {
		window.open( $(this).attr('href') );
        return false;
	});
});