company_product.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /**
  2. * Created by Administrator on 2018/3/16.
  3. */
  4. window.onload = function(){
  5. //高度自适应
  6. // $(".img").css("height",window.screen.width/3.5);
  7. // $(".img img").css("height",window.screen.width/3.5);
  8. // $("#swiper-wrapper div").mouseover(function(){
  9. // //放大图片
  10. // $(this).css({"width":"110%","height":"110%","transition":"all .2s linear"});
  11. // $(this).find("p").css({"width":"100%","top":"83.5%","transition":"all .2s linear"});
  12. // var hv = $("#swiper-wrapper div").index(this)+1;
  13. // if(hv == 1){
  14. // //图片翻页
  15. // $(".img_content div:first-child").css("display","block");
  16. // $(".img_content div:not(:first-child)").css("display","none");
  17. //
  18. // //当前按钮跟着变化
  19. // $(".num_btn li:nth-child(2) a").css({"fontSize":"24px","color":"#757DEA"});
  20. // $(".num_btn li:not(:nth-child(2)) a").css({"fontSize":"16px","color":"#9A9A96"});
  21. //
  22. // }else if(hv == 2){
  23. // $(".img_content div:nth-child(2)").css("display","block");
  24. // $(".img_content div:not(:nth-child(2))").css("display","none");
  25. //
  26. // $(".num_btn li:nth-child(3) a").css({"fontSize":"24px","color":"#757DEA"});
  27. // $(".num_btn li:not(:nth-child(3)) a").css({"fontSize":"16px","color":"#9A9A96"});
  28. //
  29. // }else if(hv == 3){
  30. // $(".img_content div:nth-child(3)").css("display","block");
  31. // $(".img_content div:not(:nth-child(3))").css("display","none");
  32. //
  33. // $(".num_btn li:nth-child(4) a").css({"fontSize":"24px","color":"#757DEA"});
  34. // $(".num_btn li:not(:nth-child(4)) a").css({"fontSize":"16px","color":"#9A9A96"});
  35. // }else if(hv ==4){
  36. // $(".img_content div:nth-child(4)").css("display","block");
  37. // $(".img_content div:not(:nth-child(4))").css("display","none");
  38. //
  39. // $(".num_btn li:nth-child(5) a").css({"fontSize":"24px","color":"#757DEA"});
  40. // $(".num_btn li:not(:nth-child(5)) a").css({"fontSize":"16px","color":"#9A9A96"});
  41. // }else if(hv == 5){
  42. // $(".img_content div:nth-child(5)").css("display","block");
  43. // $(".img_content div:not(:nth-child(5))").css("display","none");
  44. //
  45. // $(".num_btn li:nth-child(6) a").css({"fontSize":"24px","color":"#757DEA"});
  46. // $(".num_btn li:not(:nth-child(6)) a").css({"fontSize":"16px","color":"#9A9A96"});
  47. // }
  48. // }).mouseout(function(){
  49. // //恢复正常
  50. // $(this).css({"width":"100%","height":"100%","transition":"all .2s linear"});
  51. // $(this).find("p").css({"width":"100%","top":"82%","transition":"all .2s linear"});
  52. // });
  53. var swiper = new Swiper('.swiper-container', {
  54. slidesPerView: 4.6,
  55. spaceBetween: 30,
  56. pagination: {
  57. el: '.swiper-pagination',
  58. clickable: true,
  59. },
  60. });
  61. //分页条的数字显示效果
  62. $(".num_btn li a").click(function(e){
  63. e.preventDefault();
  64. $(this).css({"fontSize":"24px","color":"#757DEA"});
  65. $(this).parent().parent().siblings().children().children().css({"fontSize":"16px","color":"#9A9A96"});
  66. var open = $(".num_btn li a").index(this);
  67. if(open == 1){
  68. $(".img_content div:first-child").css("display","block");
  69. $(".img_content div:not(:first-child)").css("display","none");
  70. }else if(open == 2){
  71. $(".img_content div:nth-child(2)").css("display","block");
  72. $(".img_content div:not(:nth-child(2))").css("display","none");
  73. }else if(open == 3){
  74. $(".img_content div:nth-child(3)").css("display","block");
  75. $(".img_content div:not(:nth-child(3))").css("display","none");
  76. }else if(open ==4){
  77. $(".img_content div:nth-child(4)").css("display","block");
  78. $(".img_content div:not(:nth-child(4))").css("display","none");
  79. }else if(open == 5){
  80. $(".img_content div:nth-child(5)").css("display","block");
  81. $(".img_content div:not(:nth-child(5))").css("display","none");
  82. }
  83. });
  84. $(".num_btn ul li:first-child a").unbind("click");
  85. $(".num_btn ul li:first-child a").click(function(e){
  86. e.preventDefault();
  87. var aa = $(this).parent().parents().siblings().children().children();
  88. console.log(aa);
  89. })
  90. $(".num_btn ul li:last-child a").unbind("click");
  91. $(".num_btn ul li:last-child a").click(function(e){
  92. e.preventDefault();
  93. });
  94. //中英文之间的转化
  95. $("#eng").click(function(){
  96. $(".footer_title p:first-child").html("Fujian Shengteng Knltting Textlle Co.,Ltd.");
  97. $(".footer_top li:first-child").html("Contacts:LINXUEGUI (General Manager)");
  98. $(".footer_top li:nth-child(2)").html("Tel:+86 0591-28761238");
  99. $(".footer_top li:nth-child(3)").html("Mobile:13599097555");
  100. $(".footer_top li:last-child").html("Fax:+86 0591-28761296");
  101. $(".footer_bottom li:first-child").html("E-mail:fjshengteng@163.com");
  102. $(".footer_bottom li:last-child").html("Add:shenjutengda,Songxia Town,Changle City,Fujian Province,China");
  103. $(this).css("background","#5E97F5");
  104. $("#chn").css("background","transparent");
  105. });
  106. $("#chn").click(function(){
  107. $(".footer_title p:first-child").html("福建升腾针纺有限公司");
  108. $(".footer_top li:first-child").html("联系人:林雪贵(总经理)");
  109. $(".footer_top li:nth-child(2)").html("手机号码:13599097555");
  110. $(".footer_top li:nth-child(3)").html("电话:0591-28761238");
  111. $(".footer_top li:last-child").html("传真:0591-28761296");
  112. $(".footer_bottom li:first-child").html("邮箱:fjshengteng@163.com");
  113. $(".footer_bottom li:last-child").html("公司地址:福建省长乐市松下镇龙纺工业区");
  114. $(this).css("background","#5E97F5");
  115. $("#eng").css("background","transparent");
  116. });
  117. };