| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- $(function () {
- $('#tabs a').click(function (e) {
- e.preventDefault();
- $('#tabs li').removeClass("current").removeClass("hoverItem");
- $(this).parent().addClass("current");
- $("#content div").removeClass("show");
- console.log($(this).attr('title'));
- $('#' + $(this).attr('title')).addClass('show');
- var largeBoxs = $('.large-boxs'), selfChildrens = $($('#' + $(this).attr('title')).children('#content-items')).children();
- // console.log(selfChildrens);
- for (let i = 0; i < largeBoxs.length; i++) {
- $(largeBoxs[i]).attr('id', '');
- }
- for (let i = 0; i < selfChildrens.length; i++) {
- $(selfChildrens[i]).attr('id', 'partner-box-item' + (i + 1));
- }
- $('#partner-box-item1').addClass('show');
- });
- $('#tabs a').hover(function () {
- if (!$(this).parent().hasClass("current")) {
- $(this).parent().addClass("hoverItem");
- }
- }, function () {
- $(this).parent().removeClass("hoverItem");
- });
- $('#core-function-tabs a').click(function (e) {
- e.preventDefault();
- $('#core-function-tabs li').removeClass("current").removeClass("hoverItem");
- $(this).parent().addClass("current");
- $("#core-function-content div").removeClass("show");
- console.log($(this).attr('title'));
- $('#' + $(this).attr('title')).addClass('show');
- });
- $('#core-function-tabs a').hover(function () {
- if (!$(this).parent().hasClass("current")) {
- $(this).parent().addClass("hoverItem");
- }
- }, function () {
- $(this).parent().removeClass("hoverItem");
- });
- $('#partner-box-tabs a').click(function (e) {
- e.preventDefault();
- $("#content-items div").removeClass("show");
- let a = $(this).attr('title')
- console.log(a);
- $('#' + a).addClass('show');
- })
- });
- // leader寄语
- function $_class(name){
- var elements = document.getElementsByTagName("*");
- for(s=0;s<elements.length;s++){
- if(elements[s].className==name){
- return elements[s];
- }
- }
- }
- var tabList = $_class("menuA").getElementsByTagName("li")
- tabCon = $_class("menuB").getElementsByTagName("ul");
- for(i=0;i<tabList.length;i++){ (function(){
- var t = i;
- tabList[t].onmouseover = function(){
- for(o=0;o<tabCon.length;o++){
- tabCon[o].style.display = "none";
- tabList[o].className = "";
- if(t==o){
- this.className = "check";
- tabCon[o].style.display = "block";
- }
- }
- }
- })()}
- var tabList2 = $_class("menuA2").getElementsByTagName("li")
- tabCon2 = $_class("menuB2").getElementsByTagName("ul");
- for(i=0;i<tabList2.length;i++){ (function(){
- var t = i;
- tabList2[t].onmouseover = function(){
- for(o=0;o<tabCon2.length;o++){
- tabCon2[o].style.display = "none";
- tabList2[o].className = "";
- if(t==o){
- this.className = "check";
- tabCon2[o].style.display = "block";
- }
- }
- }
- })()}
- var tabList3 = $_class("menuA3").getElementsByTagName("li")
- tabCon3 = $_class("menuB3").getElementsByTagName("ul");
- for(i=0;i<tabList3.length;i++){ (function(){
- var t = i;
- tabList3[t].onmouseover = function(){
- for(o=0;o<tabCon3.length;o++){
- tabCon3[o].style.display = "none";
- tabList3[o].className = "";
- if(t==o){
- this.className = "check";
- tabCon3[o].style.display = "block";
- }
- }
- }
- })()}
|