$(function(){ //视频start if($(".artVideo").length>0){ var _thisVideo=$(".artVideo") var _thisVideoUrl=_thisVideo.data("url") var _thisImgUrl=_thisVideo.data("img") var videoObject = { container: '.artVideo', //视频容器 poster:_thisImgUrl,//封面图片 video:_thisVideoUrl//视频地址 }; var player=new ckplayer(videoObject)//调用播放器并赋值给变量player } //视频end $(".print").click(function() { $(".subPageRC").jqprint() }) if ($("#ewmcode").length > 0){ var qrcode = new QRCode('ewmcode', { text: window.location.href, width: 200, height: 200, colorDark: '#000000', colorLight: '#ffffff', correctLevel: QRCode.CorrectLevel.H }); } $(".articleBox img").each(function(){ $(this).parent("p").css({textIndent:0,textAlign:"center"}) }) //分享start if ($(".shareBox").length > 0) { var share = new sharejs({ dom: '.shareBox', /* 分享触发元素 */ sites: ['txQQ','wechat','sinaweibo','qzone', ], /* 自定义分享平台 */ }) } $(".fullBt").click(function() { var tabHtml = $(this).parent().siblings(".autoSizeTableC")[0].outerHTML var content = '
' + tabHtml + '
'; layer.open({ type: 1, title: '表格全屏查看', area: ['100%', '100%'], // 全屏 content: content, skin: 'fullTableLayer', // 自定义样式类 shadeClose: false, success: function(layero, index) { // 初始化横向拖动 $("html").css("overflow", "hidden"); }, end: function() { $("html").removeAttr("style"); } }); $("html").css("overflow", "hidden"); }); }) function goTop(){ $('body,html').stop().animate({scrollTop:0},1000); } $(window).scroll(function(){ var scrollH = $(window).scrollTop();//滚动条距离顶部的高度 var firstHeight = $(window).height();//浏览器屏幕的高度 if(scrollH>200){ $(".articleRight").addClass("show"); }else{ $(".articleRight").removeClass("show"); } });