// javascript document /*轮播图 qfast(false, 'widgets', function () { k.tabs({ id: 'fsd1', //焦点图包裹id conid: "d1pic1", //** 大图域包裹id tabid:"d1fbt1", tabtn:"a", concn: '.fcon', //** 大图域配置class auto: 1, //自动播放 1或0 effect: 'fade', //效果配置 etype: 'mouseover', //** 鼠标事件 pagebt:true,//是否有按钮切换页码 bns: ['.prev-wcy', '.next-wcy'],//** 前后按钮配置class interval: 8000 //** 停顿时间 }) }) */ /*微信弹出框*/ function show(obj,id) { var objdiv = $("#"+id+""); $(objdiv).css("display","block"); $(objdiv).css("left", event.clientx+10); $(objdiv).css("top", event.clienty + 10); } function hide(obj,id) { var objdiv = $("#"+id+""); $(objdiv).css("display", "none"); } /*多行文本溢出*/ $(".figcaption").each(function(i){ var divh = $(this).height(); var $p = $("ul", $(this)).eq(0); while ($p.outerheight() > divh) { $p.text($p.text().replace(/(\s)*([a-za-z0-9]+|\w)(\.\.\.)?$/, "...")); }; }); $(".figcaption_span").each(function(i){ var divh2 = $(this).height(); var $p = $("a", $(this)).eq(0); while ($p.outerheight() > divh2) { $p.text($p.text().replace(/(\s)*([a-za-z0-9]+|\w)(\.\.\.)?$/, "...")); }; }); /*鼠标移过,左右按钮显示*/ $(".slider").hover(function(){ $(this).find(".prev,.next").fadeto("show",0.5); },function(){ $(this).find(".prev,.next").hide(); }) /*鼠标移过某个按钮 高亮显示*/ $(".prev,.next").hover(function(){ $(this).fadeto("show",1); },function(){ $(this).fadeto("show",0.5); }) $(".slider").slide({ titcell:".num ul" , maincell:".sliderbox" , effect:"fold", autoplay:true, delaytime:700 , autopage:true });