123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355 |
- // JavaScript Document
- /*多选*/
- var selectCheckbox = function(name,status)
- {
- $("input[name='"+name+"']").attr("checked",status);
-
- }
- var selectCZClass = function() {
- var select = $("#czclass");
- var cid = select.val();
- if (cid > 0) {
- location.href = "/list_" + cid + ".htm";
- }
- }
- var numcover = function (priffix0)
- {
- priffix0 = priffix0 || false;
- $("li.ballbox span.ball").each(function ()
- {
- var me = $(this), _num = me.html();
- if (isNaN(_num)) return;
- if (priffix0)
- {
- if (_num.length === 1)
- me.html("0" + _num);
- } else
- {
- if (_num.length === 2 && _num[0] === "0")
- me.html(_num.substr(1, 1));
- }
- });
- }
- /*底部固定栏*/
- /*if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat'){
- cot_t1_DOCtp="_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);}";
- }else{
- cot_t1_DOCtp="_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);}";
- }
- var fdc_bodyCSS='* html {}';
- var fdcCSS='#footer {position:fixed;';
- var fdcCSS=fdcCSS+'_position:absolute; ';
- var fdcCSS=fdcCSS+'width:100%;';
- var fdcCSS=fdcCSS+'bottom:0px;';
- var fdcCSS=fdcCSS+'right:0px;';
- var fdcCSS=fdcCSS+'clip:rect(0 100% 100% 0);';
- var fdcCSS=fdcCSS+cot_t1_DOCtp;
- document.write('<style type="text/css">'+fdc_bodyCSS+fdcCSS+'</style>');*/
- /*顶部子导航*/
- function extend(){
- document.getElementById("ctl-llist").style.display = "block";
- }
- function over(){
- document.getElementById("ctl-llist").style.display = "none";
- }
- function hide(){
- document.getElementById("ctl-llist").style.display = "none";
- }
- function hideNav(){
- $(".ctl-list").slideUp(400);
- }
- function unfold(){
- var unfolds=document.getElementById("unfold")
- var enlarge = document.getElementById("enlarge");
- if(enlarge.style.display!=""){
- enlarge.style.display="";
- unfolds.className="unfold-up"
- }else{enlarge.style.display="none";
- unfolds.className="unfold"
- };
- }
- /*子导航左右切换*/
- $(document).ready(function(e) {
- $(".right").click(function(){
- var ico=$(".snav").children("a");
- var navPos = $(".snav").position();
- var widths=ico.width();
- var snavWidth=widths*ico.length-1;
- var last=snavWidth-(widths*4);
- if(Math.abs(navPos.left)%widths*3==0){
- if(navPos.left>-last){
- $(".snav").css({left:(navPos.left-(widths*3))+"px"});
- $(".left").css({display:"block"});
- }else{$(".right").css({display:"none"});}
- }
- });
- if($(".left").css="block"){
- $(".left").click(function(){
- $(".right").css({display:"block"})
- var ico=$(".snav").children("a");
- var navPos = $(".snav").position();
- var widths=ico.width();
- var snavWidth=widths*ico.length-1;
- var last=snavWidth-(widths*4);
- if(Math.abs(navPos.left)%widths*3==0){
- if(navPos.left<-widths){
- $(".snav").css({left:(navPos.left+(widths*3))+"px"});
- }else{$(".left").css({display:"none"});}
- }
- })
- }
- });
- /*工具页面滚动*/
- /*var myScroll,scroll1;
- function loaded () {
- myScroll = new IScroll('#wrapper', { mouseWheel: true,scrollbars: true,preventDefault:false,});
- click:iScrollClick();
-
- }
- document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);*/
- /*选项卡切换*/
- $(document).ready(function(){
- $(function(){
- $(".tab-mune").find("li").click(function(){
- $(".tab-mune").find("li").attr('class','');
- $(".posi-num").find("section").attr('class','hide');
- $(".content").find("section").attr('class','hide');
- $(".posi-fsnum").find("ul").attr('class','hide');
- $(".help-notice").find("ul").attr('class','hide');
- $(".shrink").find("ul").attr('class','hide');
- $(this).attr('class','select');
- $(".content").find("section").eq($(this).index()).attr('class','');
- $(".posi-fsnum").find("ul").eq($(this).index()).attr('class','');
- $(".shrink").find("ul").eq($(this).index()).attr('class','');
- $(".posi-num").find("section").eq($(this).index()).attr('class','');
- $(".help-notice").find("ul").eq($(this).index()).attr('class','');
- })
- })
-
-
- $(function(){
- $(".snav").find("a").click(function(){
- $(".snav").find("a").attr('class','');
- $(".num-result").find("ul").attr('class','hide');
- $(".swiper").find("section").attr('class','hide');
- $(this).attr('class','active');
- $(".swiper").find("section").eq($(this).index()).attr('class','');
- $(".num-result").find("ul").eq($(this).index()).attr('class','');
- })
- })
-
-
- $(function(){
- $(".snav").find("a").click(function(){
- $(".snav").find("a").attr('class','');
- $(".ssq-gs").find("ul").attr('class','hide');
- $(this).attr('class','active')
- $(".snav").offset({left:"4rem"})
- $(".ssq-gs").find("ul").eq($(this).index()).attr('class','');
- })
- })
-
- })
- /*跟随号分析详情展示*/
- $(document).ready(function(e) {
- $('.hidden').hide();
- $(".ssq-gs").find("li").click(function(){
- $(this).next().siblings("li").find("a").attr('class','');
- $(this).find("dl").slideDown();
- $(this).find("a").attr('class','blue');
- $(this).siblings("li").find("dl").slideUp();
-
- })
- });
- /*3d跟随号分析*/
- $(document).ready(function() {
- $('.hidden').hide();
- $(".list").click(function(){
- $(this).next().siblings(".list").find("a").attr('class','');
- $(this).next().slideDown();
- $(this).find("a").attr('class','blue');
- $(this).next().siblings(".hidden").slideUp();
- })
- });
-
-
- //走势图doms左右滑动事件
-
- (function (e, y) {
- "use strict";
- y.trend = { viewScroll: {}, page: {} },
- y.trend.init = function () {
- setTimeout("caiba.trend.autoWidth()", 9);
- y.trend.viewScroll.animating = !1;
- y.trend.touchEvents();
- },
- y.trend.touchEvents = function () {
- e("#ctl-llist").css("display","none");
-
- if (document.getElementById("doms")){
- y.trend.viewScroll = new iScroll("doms", {
- hScrollbar: !1,
- vScrollbar: !1,
- onScrollMove: function (r) {
- y.trend.move(r);
- },
- onAnimating: function (r) {
- y.trend.move(r);
- }
- });
- return;
- }
- if(document.getElementById("demo-pointmove")){
- var fistDiv=$("#demo-pointmove").children("div").eq(0);
- fistDiv.width($("#chartBody").width());
- y.trend.viewScroll = new iScroll("demo-pointmove", {
- hScrollbar: !1,
- vScrollbar: !1,
- onScrollMove: function (r) {
- y.trend.move(r);
- },
- onAnimating: function (r) {
- y.trend.move(r);
- }
- });
- return;
- }
- },
-
- y.trend.move = function (r) {
- var x = r.x;
- var y = r.y;
- e("#divqh").css("transform", "translate(0px, {0}px) scale(1) translateZ(0px)".format(y));
- e("#divqh").css("-webkit-transform", "translate(0px, {0}px) scale(1) translateZ(0px)".format(y));
- e("#divqh").css("-ms-transform", "translate(0px, {0}px) scale(1) translateZ(0px)".format(y));
- e("#divqh").css("-o-transform", "translate(0px, {0}px) scale(1) translateZ(0px)".format(y));
- e("#divqh").css("-moz-transform", "translate(0px, {0}px) scale(1) translateZ(0px)".format(y));
- e("#divhead").css("transform", "translate({0}px, 0px) scale(1) translateZ(0px)".format(x));
- e("#divhead").css("-webkit-transform", "translate({0}px, 0px) scale(1) translateZ(0px)".format(x));
- e("#divhead").css("-ms-transform", "translate({0}px, 0px) scale(1) translateZ(0px)".format(x));
- e("#divhead").css("-o-transform", "translate({0}px, 0px) scale(1) translateZ(0px)".format(x));
- e("#divhead").css("-moz-transform", "translate({0}px, 0px) scale(1) translateZ(0px)".format(x));
- //e("#demo-pointmove .banner-text").css("left",-x-50);
- //e("#demo-pointmove .footer").css("left",-x-50);
- e("#demo-pointmove .wrap").css("transform", "translate(0px, {0}px) scale(1) translateZ(0px)");
- e("#demo-pointmove .wrap").css("left",-x-50);
- //e("#stats").css("left",-x);
- if(y<-100){
- e(".banner-text").css("display","none");
- e("#demo-pointmove .banner-text").css("display","block");
- e(".overflow").css("display","none");
- e(".subnav").css("display","none");
- var _t = e(".topbar").height();
- var _sh = e(window).height() - _t;
- var _dh = $(".chart-header").height();
- e("#demo-pointmove").css("height", _sh);
- e("#doms").css("height",_sh);
- e(".qihao .left_conh6").css("height", _sh);
- e('.ncc.top').css('display','none');
- }else{
- e(".banner-text").css("display","block");
- e(".overflow").css("display","block");
- e(".subnav").css("display","block");
- e('.ncc.top').css('display','block');
- }
- },
- y.trend.autoWidth = function () {
- y.trend.viewScroll.refresh();
- },
- e(function () {
- y.trend.init();
- })
- })(jQuery, caiba)
-
- $(document).ready(function(){
- var preH =$('.presele-title').height()
- $("#demo-pointmove .wrap").width($("#demo-pointmove").width());
- $(".presele-title").css('lineHeight',preH+'px');
- $(".bg-black").height($(window).height());
- $(".bg-black").width($("#demo-pointmove").width());
- var wh = $('.bg-black').height();
- $("#set-chart").click(function(){
- $('.bg-black').css("display","block");
- var sh = $('.search-box').height();
- var mh = wh-sh-42;
- $(".search-box").css("margin-top",(mh/2));
- })
- $('.cancel').click(function(){$('.bg-black').css("display","none");})
- $('#show-nav').click(function(){
- if($('.zst-subnav').css("display")=="none"){
- $('.zst-subnav').css("display","block");
- $('#show-nav img').attr({src:"../static/images/up-icon.png"});
- }else{
- $('.zst-subnav').css("display","none");
- $('#show-nav img').attr({src:"../static/images/down-icon.png"});
- }
-
- })
- $('.kancl').click(function(){
- $('.kancla').css('display','block');
- $(this).css('display','none')
- var kHigh = $(window).height()/2;
- var pH = $('.kancla').find('p').height()/2;
- var kanclaPh=kHigh-pH;
- $('.kancla').find('p').css('top',kanclaPh+'px')
- })
- $('.kancla').click(function(){
- $(this).css('display','none');
- $('.kancl').css('display','block');
- })
- //2016-11-2
- var agent = navigator.userAgent.toLowerCase() ;
- var version;
- if(agent.indexOf("like mac os x") > 0){
- var regStr_saf = /os [\d._]*/gi ;
- var verinfo = agent.match(regStr_saf) ;
- version = (verinfo+"").replace(/[^0-9|_.]/ig,"").replace(/_/ig,".");
- }
- var version_str = version+"";
- if(version_str != "undefined" && version_str.length >0){
- version=version.substring(0,2);
- if(version>=10){
- var s = $('#trendBox').find('col');
- var w=[];
- for(var i=0;i<s.length;i++){
- w.push(s[i].width-.35);
- }
- for(var i=0;i<s.length;i++){
- s[i].width= w[i];
- }
- var h = $('#chartData').find('td');
- for(var i=0;i<h.length;i++){
- h[i].style.height='1.278rem';
- }
- }
- }
- })
|