//var IndexImgs={
// imgIndex:0,//当前被选中的图片的下标(index)
// internalId:0,//轮换控制 id
// imgs:[],//所有要显示的图片
// lis:[],//li
// init:function(){
// IndexImgs.imgs=[
// {
// alt:'',
// src:'',
// head:'',
// content:''
// },
// {
// alt:'',
// src:'',
// head:'',
// content:''
// },
// {
// alt:'',
// src:'',
// head:'',
// content:''
// },
// {
// alt:'',
// src:'',
// head:'',
// content:''
// },
//
//
// {
//
// alt:'',
// src:'',
// head:'',
// content:''
// }
//
// ];
// //生成li,并添加事件处理函数
// for(var i=0;i<IndexImgs.imgs.length;i++){
// var li=$("<li><img width='108' height='60' border='0' style='display:none' src='" + IndexImgs.imgs[i].src+ "' alt='" + IndexImgs.imgs[i].alt + "' /></li>");
// $('#slidenav').append(li);
// //li绑定功能
// //鼠标移入移出
// li.hover(function(){
// $(this).children('img').show().fadeIn('fast');
// },
// function(){
// $(this).children('img').hide().fadeOut('fast');
// });
// //绑定单击事件
// li.bind('click',function(imgInfo,index){
// function change(){
// $('#slidenav li').each(function(){
// $(this).removeClass('active')
// });
// $(this).addClass('active');
// IndexImgs.changeImg(imgInfo);
// IndexImgs.imgIndex=index;//设置当前图片index,使自动浏览时下一张图片从当前选中图片开始
// //点击后重新开始计时
// window.clearInterval(IndexImgs.internalId);
// IndexImgs.internalChange();
// }
// return change;
// }(IndexImgs.imgs[i],i));
//
//
// IndexImgs.lis[i]=li;//使图片与li下标一一对应
// }
// //初始化
// $('#slidenav li:first').addClass('active');
// $("#index_show_img").attr('src',IndexImgs.imgs[0].src);
// $('#index_show_img_head').html(IndexImgs.imgs[0].head);
// $('#index_show_img_content').html(IndexImgs.imgs[0].content);
// //图片切换
// IndexImgs.internalChange();
// },
// internalChange:function(){
// IndexImgs.internalId=window.setInterval(function(){//从当前被选中图片开始滚动
// IndexImgs.imgIndex=(IndexImgs.imgIndex+1)%IndexImgs.imgs.length;
// IndexImgs.lis[IndexImgs.imgIndex].click();
// },5000);
// },
// changeImg:function(img){
// //设置图片说明;
// $('#index_show_img_text').hide();//ie8需要这两行
// $('#index_show_img_text').show();
//
// $('#index_show_img_head').html(img.head);
// $('#index_show_img_content').html(img.content);
// $("#index_show_img").stop().animate({
// opacity: '.7'
// },200);
// setTimeout(function(){
// $("#index_show_img").attr('src',img.src);
// }, 200);
// setTimeout(function(){
// $("#index_show_img").stop().animate({
// opacity: '1'
// },200);
// },200);
// }
//}
备忘
最新推荐文章于 2024-09-06 07:00:00 发布