Skip to content
Extraits de code Groupes Projets
jquery.fancybox-1.3.1.js 27,6 ko
Newer Older
  • Learn to ignore specific revisions
  • 		inner.css({height:	h});
    
    		c.replaceWith(c.children());
    
    		$.fancybox.center();
    	};
    
    	$.fancybox.center = function() {
    		busy = true;
    
    		var view	= fancybox_get_viewport(),
    			margin	= currentOpts.margin,
    			to		= {};
    
    		to.top	= view[3] + ((view[1] - ((wrap.height() - titleh) + (shadow * 2 ))) * 0.5);
    		to.left	= view[2] + ((view[0] - (wrap.width() + (shadow * 2 ))) * 0.5);
    
    		to.top	= Math.max(view[3] + margin, to.top);
    		to.left	= Math.max(view[2] + margin, to.left);
    
    		wrap.css(to);
    
    		busy = false;
    	};
    
    	$.fn.fancybox.defaults = {
    		padding				:	10,
    		margin				:	20,
    		opacity				:	false,
    		modal				:	false,
    		cyclic				:	false,
    		scrolling			:	'auto',	// 'auto', 'yes' or 'no'
    
    		width				:	560,
    		height				:	340,
    
    		autoScale			:	true,
    		autoDimensions		:	true,
    		centerOnScroll		:	false,
    
    		ajax				:	{},
    		swf					:	{ wmode: 'transparent' },
    
    		hideOnOverlayClick	:	true,
    		hideOnContentClick	:	false,
    
    		overlayShow			:	true,
    		overlayOpacity		:	0.3,
    		overlayColor		:	'#666',
    
    		titleShow			:	true,
    		titlePosition		:	'outside',	// 'outside', 'inside' or 'over'
    		titleFormat			:	null,
    
    		transitionIn		:	'fade',	// 'elastic', 'fade' or 'none'
    		transitionOut		:	'fade',	// 'elastic', 'fade' or 'none'
    
    		speedIn				:	300,
    		speedOut			:	300,
    
    		changeSpeed			:	300,
    		changeFade			:	'fast',
    
    		easingIn			:	'swing',
    		easingOut			:	'swing',
    
    		showCloseButton		:	true,
    		showNavArrows		:	true,
    		enableEscapeButton	:	true,
    
    		onStart				:	null,
    		onCancel			:	null,
    		onComplete			:	null,
    		onCleanup			:	null,
    		onClosed			:	null
    	};
    
    	$(document).ready(function() {
    		fancybox_init();
    	});