jquery支持图片文本文字视频的幻灯片特效代码

所属分类: 网页特效-图片特效&上传    2023-11-08 01:50:31

jquery支持图片文本文字视频的幻灯片特效代码 ie兼容6
反馈问题  查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

jquery支持图片文本文字视频的幻灯片特效代码(共9个文件)

    • index.html

使用方法

/**
 * home JS - separated because homepages usually use a lot of stuff the rest of the site doesn't need
 */
/* define $ as jQuery just in case */
(function ($) {
	/* slideshow - my custom plugin */
	$.fn.slideshow = function () {
		/* set vars */
		var slideshow = this;
		var slides = slideshow.find('.slide');
		var controls = slideshow.find('.control');
		var active_slides = slideshow.find('.slide.active');
		var active_slide = active_slides.first().length > 0 ? active_slides.first() : slideshow.find('.slide:eq(0)');
		var target_index = active_slide.index();
		var target_el = slideshow.find('.slide:eq(' + target_index + ')');
		var target_control = slideshow.find('.control:eq(' + target_index + ')');
		var slide_speed = 10000;
		var timer;

		/* hide the slides before showing the active slide */
		slideshow.hide();
		$(window).load(function () {
			/* hide all slides, then show the active one */
			slides.removeClass('active').hide();
			target_el.addClass('active').show();

			/* remove active class from all controls and then add it to the target (active) control */
			controls.removeClass('active');
			target_control.addClass('active');

			/* show the slideshow when everything is set */
			slideshow.show();

			/* animate the slideshow every XX seconds */
			var timer = setInterval(show_next_slide, slide_speed);
		});

		/* navigator */
		slideshow.on('click', '.control', function (e) {
			/* reset the timer */
			window.clearInterval(timer);

			/* set the vars */
			var target_index = $(this).index();
			var target_slide = slideshow.find('.slide:eq(' + target_index + ')');

			/* show the targeted slide */
			slides.removeClass('active').hide();
			target_slide.show().addClass('active');

			/* change the control nav to active */
			controls.removeClass('active');
			$(this).addClass('active');
			e.preventDefault();
		});

		/* animate slides */
		function show_next_slide() {
			/* set the vars */
			var slides = slideshow.find('.slide');
			var curr_slide = slideshow.find('.slide.active');
			var curr_index = curr_slide.index();
			var next_index = parseInt(curr_index + 1);
			if (next_index > slides.length - 1) {
				var next_index = 0;
			}
			var target_el = slideshow.find('.slide:eq(' + next_index + ')');
			var target_control = slideshow.find('.control:eq(' + next_index + ')');

			/* show the next slide */
			slides.hide().removeClass('active');
			target_el.show().addClass('active');

			/* change the control nav to active */
			controls.removeClass('active');
			target_control.addClass('active');
		}
	}
})(jQuery);

站长提示:
1. 平台上所有素材资源,需注册登录会员方能正常下载。
2. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励20K币
3. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
4. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 图片特效&上传

css基于clip-path创建的圆形分割图片展示特效代码

一款css绘制的圆形图片展示特效,使用CSS的clip-path属性来对圆形进行切片,并在分割的扇形区块中放置背景图片。
  图片特效&上传
 197  

jquery延时载入动画图片轮播特效

预先加载背景大图,延迟载入最上层小图,带淡入淡出动画特效!
  图片特效&上传
 228  

原生js使用CSS3不规则绘制裁剪图片插件

该插件使用了ClipPath,兼容所有主流浏览器,非常的简单实用!
  图片特效&上传
 287  

jquery创建多张图片合成动画特效插件

一款可使用多张图片组合起来的幻灯片动画特效,非常简单有趣。
  图片特效&上传
 175  

评论数(0) 回复有机会获得K币 用户协议

^_^ 还没有人评论,快来抢个沙发!
😀
  • 😀
  • 😊
  • 😂
  • 😍
  • 😑
  • 😷
  • 😵
  • 😛
  • 😣
  • 😱
  • 😋
  • 😎
  • 😵
  • 😕
  • 😶
  • 😚
  • 😜
  • 😭
发表评论