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

css3鼠标悬停图片放大和遮罩层阴影特效代码

一款鼠标悬停图片放大和边框阴影特效,鼠标悬停于图片上,自动触发图片放大动画特效,以及显示文本文字和图片边框阴影特效。
  图片特效&上传
 8951  0

jquery压缩上传图片质量代码

一款图片上传压缩实现代码,可自定义设置压缩比例,可大大减轻服务器压力!
  图片特效&上传
 4672  0

jquery响应式手风琴图片切换轮播插件

一款鼠标hover悬停展开显示图片特效,鼠标移走收回隐藏图片,很实用。
  图片特效&上传
 9784  0

jquery带自动播放的图片轮播插件

一款简单实用的焦点图插件,点击左右按钮可触发左右滑入滑出动画特效。
  图片特效&上传
 3650  0

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

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