$(function(){ ///////主页轮播图 var num =0; $('.btn1').click(function(){ num--; $('.divmov').animate({left:'+=1300px'},200) if( num==-1){ $('.divmov').animate({left:'-3900px'},1) num=2; } }); $('.btn2').click(function(){ num++; $('.divmov').animate({left:'+=-1300px'},200) if( num==3){ $('.divmov').animate({left:'-1300px'},1) num=0; } }); $('.01').click(function(){ window.location.href="http://news.lucky-special.com/2021/0423/c21a113587/page.htm"; }) $('.02').click(function(){ window.location.href="index03.html"; }) $('.03').click(function(){ window.location.href="http://xb.lucky-special.com/info/1044/2792.htm"; }) ///左下轮播 $(function(){ var num1 = 0; var img1 = ['img/pic01.jpg','img/pic02.jpg','img/pic03.jpg']; var imgname=['http://news.lucky-special.com/2021/0417/c21a113409/page.htm','http://news.lucky-special.com/2021/0410/c21a113256/page.htm','http://news.lucky-special.com/2021/0401/c65a113156/page.htm'] $('.img-left').attr('src',img1[0]); $('.img-left').click(function(){ window.location.href=imgname[num1]; }) function show(){ $('.img-left').attr('src',img1[num1]); $('.img-left').attr('src',img1[num1]).fadeOut(0).fadeIn(50); $('.img-left').click(function(){ window.location.href=imgname[num1]; }) } $('.btn4').click(function(){ num1++; if(num1>img1.length-1){ num1=0 } show() }) $('.btn3').click(function(){ num1--; if(num1<0){ num1=img1.length-1 } show() }) }); //检索 $('.search').click(function(){ if( $('.search').val()=="请输入关键字"){ $('.search').val(""); } }); //点击效果优化 $('.organization').mouseover(function(){ $('.top-title01').css('display','block') }); $('.organization').mouseout(function(){ $('.top-title01').css('display','none') }); $('.top-title01').mouseover(function(){ $(this).css('display','block') }); $('.top-title01').mouseout(function(){ $(this).css('display','none') }); ///////////////////////////////////////////////////////// $('.sevice').mouseover(function(){ $('.top-title02').css('display','block') }); $('.sevice').mouseout(function(){ $('.top-title02').css('display','none') }); $('.top-title02').mouseover(function(){ $(this).css('display','block') }); $('.top-title02').mouseout(function(){ $(this).css('display','none') }); /////////////////////////////////////////////////////////////////子标题栏点击效果 $('.top-title01').children('li').mouseover(function(){ $(this).css('background','#014c42') }); $('.top-title01').children('li').mouseout(function(){ $(this).css('background','#006457') }); $('.top-title02').children('li').mouseover(function(){ $(this).css('background','#014c42') }); $('.top-title02').children('li').mouseout(function(){ $(this).css('background','#006457') }); /////右下角div $('.menu').children('li').mouseover(function(){ $(this).css('cursor','pointer') }) $('.menu').children('li').eq(0).click(function(){ window.location.href="http://xxgk.lucky-special.com/"; }) $('.menu').children('li').eq(1).click(function(){ window.location.href="#"; }) $('.menu').children('li').eq(2).click(function(){ window.location.href="http://xb.lucky-special.com/xxck.htm/"; }) $('.menu').children('li').eq(3).click(function(){ window.location.href="http://aao.lucky-special.com/jxrl1.htm"; }) $('.menu').children('li').eq(4).click(function(){ window.location.href="/glyfwbm/list.htm"; }) ///2级页面td点击 $('.td02').parent('tr').css('background','#f7f7f7') $('.td02').parent('tr').mouseover(function(){ $(this).css('background','#f3fffd') }); $('.td02').parent('tr').mouseout(function(){ $(this).css('background','#f7f7f7') }); $('.td03').parent('tr').mouseover(function(){ $(this).css('background','#f3fffd') }); $('.td03').parent('tr').mouseout(function(){ $(this).css('background','#ffffff') }); });