supplychain-cloud-pc.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. $(function () {
  2. $('#tabs a').click(function (e) {
  3. e.preventDefault();
  4. $('#tabs li').removeClass("current").removeClass("hoverItem");
  5. $(this).parent().addClass("current");
  6. $("#content div").removeClass("show");
  7. console.log($(this).attr('title'));
  8. $('#' + $(this).attr('title')).addClass('show');
  9. var largeBoxs = $('.large-boxs'), selfChildrens = $($('#' + $(this).attr('title')).children('#content-items')).children();
  10. // console.log(selfChildrens);
  11. for (let i = 0; i < largeBoxs.length; i++) {
  12. $(largeBoxs[i]).attr('id', '');
  13. }
  14. for (let i = 0; i < selfChildrens.length; i++) {
  15. $(selfChildrens[i]).attr('id', 'partner-box-item' + (i + 1));
  16. }
  17. $('#partner-box-item1').addClass('show');
  18. });
  19. $('#tabs a').hover(function () {
  20. if (!$(this).parent().hasClass("current")) {
  21. $(this).parent().addClass("hoverItem");
  22. }
  23. }, function () {
  24. $(this).parent().removeClass("hoverItem");
  25. });
  26. $('#core-function-tabs a').click(function (e) {
  27. e.preventDefault();
  28. $('#core-function-tabs li').removeClass("current").removeClass("hoverItem");
  29. $(this).parent().addClass("current");
  30. $("#core-function-content div").removeClass("show");
  31. console.log($(this).attr('title'));
  32. $('#' + $(this).attr('title')).addClass('show');
  33. });
  34. $('#core-function-tabs a').hover(function () {
  35. if (!$(this).parent().hasClass("current")) {
  36. $(this).parent().addClass("hoverItem");
  37. }
  38. }, function () {
  39. $(this).parent().removeClass("hoverItem");
  40. });
  41. $('#partner-box-tabs a').click(function (e) {
  42. e.preventDefault();
  43. $("#content-items div").removeClass("show");
  44. let a = $(this).attr('title')
  45. console.log(a);
  46. $('#' + a).addClass('show');
  47. })
  48. });
  49. // leader寄语
  50. function $_class(name){
  51. var elements = document.getElementsByTagName("*");
  52. for(s=0;s<elements.length;s++){
  53. if(elements[s].className==name){
  54. return elements[s];
  55. }
  56. }
  57. }
  58. var tabList = $_class("menuA").getElementsByTagName("li")
  59. tabCon = $_class("menuB").getElementsByTagName("ul");
  60. for(i=0;i<tabList.length;i++){ (function(){
  61. var t = i;
  62. tabList[t].onmouseover = function(){
  63. for(o=0;o<tabCon.length;o++){
  64. tabCon[o].style.display = "none";
  65. tabList[o].className = "";
  66. if(t==o){
  67. this.className = "check";
  68. tabCon[o].style.display = "block";
  69. }
  70. }
  71. }
  72. })()}
  73. var tabList2 = $_class("menuA2").getElementsByTagName("li")
  74. tabCon2 = $_class("menuB2").getElementsByTagName("ul");
  75. for(i=0;i<tabList2.length;i++){ (function(){
  76. var t = i;
  77. tabList2[t].onmouseover = function(){
  78. for(o=0;o<tabCon2.length;o++){
  79. tabCon2[o].style.display = "none";
  80. tabList2[o].className = "";
  81. if(t==o){
  82. this.className = "check";
  83. tabCon2[o].style.display = "block";
  84. }
  85. }
  86. }
  87. })()}
  88. var tabList3 = $_class("menuA3").getElementsByTagName("li")
  89. tabCon3 = $_class("menuB3").getElementsByTagName("ul");
  90. for(i=0;i<tabList3.length;i++){ (function(){
  91. var t = i;
  92. tabList3[t].onmouseover = function(){
  93. for(o=0;o<tabCon3.length;o++){
  94. tabCon3[o].style.display = "none";
  95. tabList3[o].className = "";
  96. if(t==o){
  97. this.className = "check";
  98. tabCon3[o].style.display = "block";
  99. }
  100. }
  101. }
  102. })()}