分享网正式开通,我们为大家提供免费资源,欢迎大家踊跃投稿!

jQuery弹窗放大图片展示插件

这是一款类似lightbox点击图片放大预览效果的jQuery弹窗放大图片展示插件,有多种展示方式可供选择,具体请看演示。


js代码

<script type="text/javascript" src="js/jquery.galpop.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('.galpop-single').galpop();

		$('.galpop-multiple').galpop();

		$('.galpop-info').galpop();


		var callback = function() {
			var wrapper = $('#galpop-wrapper');
			var info    = $('#galpop-info');
			var count   = wrapper.data('count');
			var index   = wrapper.data('index');
			var current = index + 1;
			var string  = 'Image '+ current +' of '+ count;

			info.append('<p>'+ string +'</p>').fadeIn();

		};
		$('.galpop-callback').galpop({
			callback: callback
		});

		$('.manual-open').change(function(e) {
			var image = $(this).val();
			if (image) {
				var settings = {};
				$.fn.galpop('openBox',settings,image);
			}
		});

		$('.manual-open-group').change(function(e) {
			var v = $(this).val();
			var images = [
				'images/gallery/large/apocalypse.jpg',
				'images/gallery/large/vintage.jpg',
				'images/gallery/large/magicLake.jpg',
				'images/gallery/large/underwater.jpg',
				'images/gallery/large/goodBoy.jpg',
				'images/gallery/large/darkroad.jpg',
				'images/gallery/large/roadkill.jpg',
				'images/gallery/large/wolfMarine.jpg',
				'images/gallery/large/alice.jpg',
				'images/gallery/large/reflection.jpg',
			];
			var settings = {};
			$.fn.galpop('openBox',settings,images,v);
		});

		$('.click-open-iframe').galpop({
			contentType: 'iframe',
		});

		$('.click-open-ajax').galpop({
			contentType: 'AJAX',
		});
	});
</script>


在线预览
资源均来自第三方,谨慎下载,前往第三方网站下载


爱资源分享网 , 版权所有丨本站资源仅限于学习研究,严禁从事商业或者非法活动!丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:jQuery弹窗放大图片展示插件
喜欢 ()分享 (0)