Return to Snippet

Revision: 67837
at October 31, 2014 02:41 by madebycrunch


Initial Code
$("a.fancyimage").fancybox({
	'transitionIn'  :  'elastic',
	'transitionOut'  :  'elastic',
	'speedIn'    :   300, 
	'speedOut'    :   300, 
	'overlayShow'  :    true,
	'overlayOpacity':    0.7,
	'overlayColor'  :   "#000"
});

$("a.fancyyoutube").click(function() {
	$.fancybox({
		'padding': 0,
		'overlayShow'	:    true,
		'overlayOpacity': 	 0.7,
		'overlayColor'	: 	"#000",
		'autoScale': true,
		'transitionIn': 'elastic',
		'transitionOut': 'elastic',
		'speedIn': 300,
		'speedOut':300,
		'title': this.title,
		'width': 680,
		'height': 495,
		'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
		'type': 'swf',
		'swf': {
			'wmode': 'transparent',
			'allowfullscreen': 'true'
		}
	});

	return false;
});

$("a.fancyvimeo").click(function() {
	$.fancybox({
		'padding': 0,
		'overlayShow'	:    true,
		'overlayOpacity': 	 0.7,
		'overlayColor'	: 	"#000",
		'autoScale': true,
		'transitionIn': 'elastic',
		'transitionOut': 'elastic',
		'speedIn': 300,
		'speedOut':300,
		'title': this.title,
		'width': 680,
		'height': 495,
		'href': this.href.replace(new RegExp("([0-9])", "i"), 'moogaloop.swf?clip_id=$1'),
		'type': 'swf'
	});

	return false;
});

Initial URL


Initial Description
jQuery - Page Component - Gallery Fancybox

Initial Title
jQuery - Page Component - Gallery

Initial Tags


Initial Language
jQuery