webかたつむり ウェブデザインを勉強中 ウェブ初心者のおぼえがき

webかたつむり

WEB制作会社のフォトグラファー

jQuery plugin "fancy Box" 2

Alternatively, you can set content type as an option: $(".open_ajax").fancybox({type: 'ajax'});.

 

Note, ajax requests are subject to the same origin policy. If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed (this is different from previous versions where 'ajax' was used as default type or an error message was displayed). 

<ul class="list">
	<li>
		<a class="various fancybox.ajax" href="/demo/ajax.php">Ajax</a>
	</li>
	<li>
		<a class="various" data-fancybox-type="iframe" href="/demo/iframe.html">Iframe</a>
	</li>
	<li>
		<a class="various" href="#inline">Inline</a>
	</li>
	<li>
		<a class="various" href="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">SWF</a>
	</li>
</ul>

<ul class="list">
	<li>
		<a class="various fancybox.iframe" href="http://www.youtube.com/embed/L9szn1QQfas?autoplay=1">Youtube (iframe)</a>
	</li>
	<li>
		<a class="various fancybox.iframe" href="http://maps.google.com/?output=embed&f=q&source=s_q&hl=en&geocode=&q=London+Eye,+County+Hall,+Westminster+Bridge+Road,+London,+United+Kingdom&hl=lv&ll=51.504155,-0.117749&spn=0.00571,0.016512&sll=56.879635,24.603189&sspn=10.280244,33.815918&vpsrc=6&hq=London+Eye&radius=15000&t=h&z=17">Google maps (iframe)</a>
	</li>
	<li>
		<a class="various" href="/data/non_existing_image.jpg">Non-existing url</a>
	</li>
</ul>

 

$(document).ready(function() {
	$(".various").fancybox({
		maxWidth	: 800,
		maxHeight	: 600,
		fitToView	: false,
		width		: '70%',
		height		: '70%',
		autoSize	: false,
		closeClick	: false,
		openEffect	: 'none',
		closeEffect	: 'none'
	});
});

Alternatively, you can set content type as an option: $(".open_ajax").fancybox({type: 'ajax'});.

 

Note, ajax requests are subject to the same origin policy. If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed (this is different from previous versions where 'ajax' was used as default type or an error message was displayed).