(function () { var showmorenchildren = function ($children, n) { var $hiddenchildren = $children.filter(":hidden"); var cnt = $hiddenchildren.length; for (var i = 0; i < n && i < cnt ; i++) { (function (i) { settimeout(function () { $hiddenchildren.eq(i).fadein(500); }, 100 * i); })(i) } return cnt - n;//返回还剩余的隐藏子元素的数量 } // 投资者关系-公司治理-章程制度列表加载更多 jquery.showmore1 = function (selector,num) { //初始化按钮 let tab1213s = $('.tab1213 .li').length; if(tab1213s<=num){ $('.showmorenchildren #getmore').html('没有更多了~').addclass('nomore').removeclass('more-butn'); }else{ $('.showmorenchildren #getmore').html('了解更多').addclass('more-butn').removeclass('nomore'); } if (selector == undefined) { selector = ".showmorenchildren" } $(selector).each(function () { var pagesize = $(this).attr("pagesize") || num; var $children = $(this).find('.tab1213 .li'); if ($children.length > pagesize) { for (var i = pagesize; i < $children.length; i++) { $children.eq(i).hide(); } $("#getmore").click(function () { if (showmorenchildren($children, pagesize) <= 0) { $(this).html("没有更多了~").addclass('nomore').removeclass('more-butn'); }else{ $(this).html('了解更多').addclass('more-butn').removeclass('nomore'); }; }); } }); } // 投资者关系-投资者服务-活动预告列表加载更多 jquery.showmore2 = function (selector,num) { //初始化按钮 let tab1213s = $('.acad-ul .acad-li').length; if(tab1213s<=num){ $('.acad #getmore').html('没有更多了~').addclass('nomore').removeclass('more-butn'); }else{ $('.acad #getmore').html('了解更多').addclass('more-butn').removeclass('nomore'); } if (selector == undefined) { selector = ".showmorenchildren" } $(selector).each(function () { var pagesize = $(this).attr("pagesize") || num; var $children = $(this).find('.acad-li'); if ($children.length > pagesize) { for (var i = pagesize; i < $children.length; i++) { $children.eq(i).hide(); } $("#getmore").click(function () { if (showmorenchildren($children, pagesize) <= 0) { $(this).html("没有更多了~").addclass('nomore').removeclass('more-butn'); }else{ $(this).html('了解更多').addclass('more-butn').removeclass('nomore'); }; }); } }); } })(); $(document).ready(function () { function abc(){ var widths = document.documentelement.clientwidth; if(widths<=1018){ window['adaptive'].desinwidth = 750; // 设计图宽度 window['adaptive'].basefont = 28; // 没有缩放时的字体大小 window['adaptive'].maxwidth = 750;// 页面最大宽度 window['adaptive'].scaletype = 1; window['adaptive'].init();// 调用初始化方法 }else{ window['adaptive'].desinwidth = 1920; // 设计图宽度 window['adaptive'].basefont = 16; // 没有缩放时的字体大小 window['adaptive'].maxwidth = 1920;// 页面最大宽度 window['adaptive'].scaletype = 1; window['adaptive'].init();// 调用初始化方法 } } window.addeventlistener('resize',abc); abc(); if (!(/msie [6|7|8|9]/i.test(navigator.useragent))){ new wow().init(); }; // 投资者服务-投资者保护-现金分红政策执行情况现金分红保留两位小数 function numbs(){ let that = $('.inve1 table tbody tr'); let inx = that.length; for(let i=0;i 0) { mobile_flag = true; break; } } var screen_width = window.screen.width; if(screen_width <= 992){ mobile_flag = true; } return mobile_flag; } function scrollt(){ var topp = $(document).scrolltop(); console.log(topp) if(topp > 10){ let height = $('.pc-head .head1').outerheight() console.log(height); $('.head').css('transform','translatey(-'+height+'px)'); $('.pc-head .head2').addclass("movetop"); $('.pc-head .head2 a.logo').fadein(300,"swing"); $('.pc-head .head2 nav .head2-search').fadein(0) $('.backtop').fadein(500); }else{ $('.head').css('transform','translatey(0)'); $(".pc-head .head2").removeclass("movetop"); $('.pc-head .head2 nav .head2-search').fadeout(0) $('.pc-head .head2 a.logo').stop().fadeout(200,"swing"); $('.backtop').fadeout(500); } } // scrollt(); if(ismobile()){ }else{ $(window).scroll(function(){ scrollt() }); } }) //页内导航 $('.pc-head .head2 nav .li .li-info .li-box .uls .ul .li').click(function(e) { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); var height = $('.head').outerheight(); if (target.length) { $('html,body').animate({ scrolltop: target.offset().top - height }, 900); return false; } } }); // 新页面打开跳转 window.onload=function(){ let hash = window.location.hash; if(hash!=''){ $('html,body').animate({scrolltop:'0px'},0); settimeout(function (){ var height = $('.head').outerheight(true); $("html, body").animate({scrolltop: $(hash).offset().top-height}, {duration: 800,easing: "swing"}); },800); } } $(".headnav").hover(function() { $(this).addclass("ons") }, function() { $(this).removeclass("ons") }); $(window).scroll(function() { var swh = $(window).scrolltop(); if (swh > 30) { $(".headnav").addclass("ons head-martop"); $(".nav_bot").addclass("downmens"); $(".headnav").hover(function() { $(this).addclass("ons head-martop") }, function() { $(this).addclass("ons head-martop") }); $(".totops a").fadein(); } else { $(".headnav").removeclass("ons head-martop"); $(".nav_bot").removeclass("downmens"); $(".headnav").hover(function() { $(this).addclass("ons"); $(this).removeclass("head-martop"); }, function() { $(this).removeclass("ons head-martop") }); $(".totops a").fadeout(); } }); // 导航下拉菜单 $(".nav_bot .navbotuls li").hover(function() { $(this).find(".down-listbox").stop(true, true).fadein(); }, function() { $(this).find(".down-listbox").stop(true, true).fadeout(); }); // 导航搜索 $('.navsearch').click(function() { $('.nav_bot').fadeout(300); $('.guanbia').fadein(); $('.nav').addclass('navon'); $('.h_search').addclass('h_searchon'); $('.hsbg').addclass('hsbgon'); }); $('.guanbia').click(function() { $('.nav_bot').fadein(300); $('.guanbia').fadeout(); $('.nav').removeclass('navon'); $('.h_search').removeclass('h_searchon'); $('.hsbg').removeclass('hsbgon'); }); // 数字滚动,需引入文件,否则部分页面报错,放置最后一句js避免影响其它板块 // $('.counter').countup({ // delay: 10, // time: 2000 // });