123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- /**
- * Created by Administrator on 2018/3/16.
- */
- window.onload = function(){
- //高度自适应
- // $(".img").css("height",window.screen.width/3.5);
- // $(".img img").css("height",window.screen.width/3.5);
- // $("#swiper-wrapper div").mouseover(function(){
- // //放大图片
- // $(this).css({"width":"110%","height":"110%","transition":"all .2s linear"});
- // $(this).find("p").css({"width":"100%","top":"83.5%","transition":"all .2s linear"});
- // var hv = $("#swiper-wrapper div").index(this)+1;
- // if(hv == 1){
- // //图片翻页
- // $(".img_content div:first-child").css("display","block");
- // $(".img_content div:not(:first-child)").css("display","none");
- //
- // //当前按钮跟着变化
- // $(".num_btn li:nth-child(2) a").css({"fontSize":"24px","color":"#757DEA"});
- // $(".num_btn li:not(:nth-child(2)) a").css({"fontSize":"16px","color":"#9A9A96"});
- //
- // }else if(hv == 2){
- // $(".img_content div:nth-child(2)").css("display","block");
- // $(".img_content div:not(:nth-child(2))").css("display","none");
- //
- // $(".num_btn li:nth-child(3) a").css({"fontSize":"24px","color":"#757DEA"});
- // $(".num_btn li:not(:nth-child(3)) a").css({"fontSize":"16px","color":"#9A9A96"});
- //
- // }else if(hv == 3){
- // $(".img_content div:nth-child(3)").css("display","block");
- // $(".img_content div:not(:nth-child(3))").css("display","none");
- //
- // $(".num_btn li:nth-child(4) a").css({"fontSize":"24px","color":"#757DEA"});
- // $(".num_btn li:not(:nth-child(4)) a").css({"fontSize":"16px","color":"#9A9A96"});
- // }else if(hv ==4){
- // $(".img_content div:nth-child(4)").css("display","block");
- // $(".img_content div:not(:nth-child(4))").css("display","none");
- //
- // $(".num_btn li:nth-child(5) a").css({"fontSize":"24px","color":"#757DEA"});
- // $(".num_btn li:not(:nth-child(5)) a").css({"fontSize":"16px","color":"#9A9A96"});
- // }else if(hv == 5){
- // $(".img_content div:nth-child(5)").css("display","block");
- // $(".img_content div:not(:nth-child(5))").css("display","none");
- //
- // $(".num_btn li:nth-child(6) a").css({"fontSize":"24px","color":"#757DEA"});
- // $(".num_btn li:not(:nth-child(6)) a").css({"fontSize":"16px","color":"#9A9A96"});
- // }
- // }).mouseout(function(){
- // //恢复正常
- // $(this).css({"width":"100%","height":"100%","transition":"all .2s linear"});
- // $(this).find("p").css({"width":"100%","top":"82%","transition":"all .2s linear"});
- // });
- var swiper = new Swiper('.swiper-container', {
- slidesPerView: 4.6,
- spaceBetween: 30,
- pagination: {
- el: '.swiper-pagination',
- clickable: true,
- },
- });
- //分页条的数字显示效果
- $(".num_btn li a").click(function(e){
- e.preventDefault();
- $(this).css({"fontSize":"24px","color":"#757DEA"});
- $(this).parent().parent().siblings().children().children().css({"fontSize":"16px","color":"#9A9A96"});
- var open = $(".num_btn li a").index(this);
- if(open == 1){
- $(".img_content div:first-child").css("display","block");
- $(".img_content div:not(:first-child)").css("display","none");
- }else if(open == 2){
- $(".img_content div:nth-child(2)").css("display","block");
- $(".img_content div:not(:nth-child(2))").css("display","none");
- }else if(open == 3){
- $(".img_content div:nth-child(3)").css("display","block");
- $(".img_content div:not(:nth-child(3))").css("display","none");
- }else if(open ==4){
- $(".img_content div:nth-child(4)").css("display","block");
- $(".img_content div:not(:nth-child(4))").css("display","none");
- }else if(open == 5){
- $(".img_content div:nth-child(5)").css("display","block");
- $(".img_content div:not(:nth-child(5))").css("display","none");
- }
- });
- $(".num_btn ul li:first-child a").unbind("click");
- $(".num_btn ul li:first-child a").click(function(e){
- e.preventDefault();
- var aa = $(this).parent().parents().siblings().children().children();
- console.log(aa);
- })
- $(".num_btn ul li:last-child a").unbind("click");
- $(".num_btn ul li:last-child a").click(function(e){
- e.preventDefault();
- });
- //中英文之间的转化
- $("#eng").click(function(){
- $(".footer_title p:first-child").html("Fujian Shengteng Knltting Textlle Co.,Ltd.");
- $(".footer_top li:first-child").html("Contacts:LINXUEGUI (General Manager)");
- $(".footer_top li:nth-child(2)").html("Tel:+86 0591-28761238");
- $(".footer_top li:nth-child(3)").html("Mobile:13599097555");
- $(".footer_top li:last-child").html("Fax:+86 0591-28761296");
- $(".footer_bottom li:first-child").html("E-mail:fjshengteng@163.com");
- $(".footer_bottom li:last-child").html("Add:shenjutengda,Songxia Town,Changle City,Fujian Province,China");
- $(this).css("background","#5E97F5");
- $("#chn").css("background","transparent");
- });
- $("#chn").click(function(){
- $(".footer_title p:first-child").html("福建升腾针纺有限公司");
- $(".footer_top li:first-child").html("联系人:林雪贵(总经理)");
- $(".footer_top li:nth-child(2)").html("手机号码:13599097555");
- $(".footer_top li:nth-child(3)").html("电话:0591-28761238");
- $(".footer_top li:last-child").html("传真:0591-28761296");
- $(".footer_bottom li:first-child").html("邮箱:fjshengteng@163.com");
- $(".footer_bottom li:last-child").html("公司地址:福建省长乐市松下镇龙纺工业区");
- $(this).css("background","#5E97F5");
- $("#eng").css("background","transparent");
- });
- };
|