您好,欢迎来到jQuery吧!QQ群:193687763(钱端开发)

jQuery吧-Write Less, Do More | 注重前端开发

首页 > javascript > js代码 > 正文

八屏动态js焦点图代码效果

2014-05-08 09:05:44 作者:天外飞仙 人气:1082 Views

八屏动态js焦点图代码效果
八屏动态js焦点图代码效果
部分js代码

var timeout2 = 5000; //切换时间var timeout3 = 10000; //mouse over 后切换时间var now_content = 0;var total_content = 8;var way = 1;var start_content = Math.round(Math.random() * (total_content - 1)) + 1; //除广告为第一显示外function content_mouse(num) { now_content = num; window.clearInterval(theTimer2); for (var i = 1; i <= total_content; i++) { document.getElementById('divhl0' + i).style.display = 'none'; } document.getElementById('divhl0' + num).style.display = 'block'; theTimer2 = setTimeout('change_content()', timeout3);}function change_content() { for (var i = 1; i <= total_content; i++) { document.getElementById('divhl0' + i).style.display = 'none'; } document.getElementById('divhl0' + now_content).style.display = 'block'; if (way) now_content++; else now_content--; if (now_content > total_content) { now_content = total_content - 1; way = 0; } else if (now_content == 0) { now_content = 1; way = 1; } theTimer2 = setTimeout('change_content()', timeout2);}theTimer2 = setTimeout(function() { now_content = 1; change_content();},timeout2);

jQuery吧整理http://www.jqueryba.com/3863.html
下载地址
预览地址

链接:http://www.jqueryba.com/3863.html(转载时请注明本文出处及文章链接)
分类:js代码

jQuery吧-Write Less, Do More | 注重前端开发

jQuery吧-Write Less, Do More | 注重前端开发

Copyright © 2013 jqueryba.com, All Rights Reserved.奔跑在阿里云

免责声明:本站所有内容来源于互联网。如果本站部分内容侵犯您的权益,请您告知,站长会立即处理 苏ICP备12059471号

站内所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!