s(":visible")){
$("#topnavbox").hide();
}
$("div#topnavboxto").sho();
},function(){
$("div#topnavboxto").hide();
});
//但显示设置时如果隐藏显示则隐藏
$("a.yuedushezhi").click(function(){
if($("div#topnavboxto").is(":visible")){
$("div#topnavboxto").hide();
}
});
//页面功能引导区
varuserreadset=getcookie("userreadset");
if(!userreadset){
setcookie("userreadset",1,30);
}
//判断背景颜色设置cookie是否保存如果存在恢复设置
if(readsetbackground){
if(readsetbackground=='rbgcloselight'){
$(".lilighttxet").text('开灯');
$("div#readercontainer").css("color","#666");
}elseif(readsetbackground=='rbgopenlight'){
$(".lilighttxet").text('关灯');
$("div#readercontainer").css("color","rgb(0,0,0)");
}
}
//判断文本字体大小设置cookie是否保存如果存在恢复设置
varreadsetfontsize=getcookie("readsetfontsize");
if(readsetfontsize){
$("div#readercontainer").css("font-size",readsetfontsize+"px");
}
//判断文本行间距设置cookie是否保存如果存在恢复设置
varreadsetlineheihgt=getcookie("readsetlineheihgt");
if(readsetlineheihgt){
$("div#readercontainer").css("line-height",readsetlineheihgt+"px");
}
//减小字体
$("#ddminus").click(function(){
varfontbody=$("div#readercontainer").css("font-size");
varfontsize=parseint(fontbody);
if(fontsize>16){
varnefont=eval(fontsize-2);
$("div#readercontainer").css("font-size",nefont+"px");
$("#ddplus").html("a+");
varfontbody=$("div#readercontainer").css("font-size");
varfontsize=parseint(fontbody);
if(fontsize==16){
$("#ddminus").html("a");
}
//添加cookie记录
setcookie("readsetfontsize",nefont,30);
}
});
//增大字体
$("#ddplus").click(function(){
varfontbody=$("div#readercontainer").css("font-size");
varfontsize=parseint(fontbody);
if(fontsizea-");
varfontbody=$("div#readercontainer").css("font-size");
varfontsize=parseint(fontbody);
if(fontsize==28){
$("#ddplus").html("a");
}
//添加cookie记录
setcookie("readsetfontsize",nefont,30);
}
});
//行间距设置增大
$("#hang-xiao").click(function(){
varlineheight=$("div#readercontainer").css("line-height");
varlineheightnum=parseint(lineheight);
if(lineheightnum>25){
varlinehn=eval(lineheightnum-4);
$("div#readercontainer").css("line-height",linehn+"px");
$("#hang-da").html("t+");
varlineheight=$("div#readercontainer").css("line-height");
varlineheightnum=parseint(lineheight);
if(lineheightnum==22){
$("#hang-xiao").html("t");
}
//添加cookie记录
setcookie("readsetlineheihgt",linehn,30);
}
});
//行间距设置减小
$("#hang-da").click(function(){
varlineheight=$("div#readercontainer").css("line-height");
varlineheightnum=parseint(lineheight);
if(lineheightnumt-");
varlineheight=$("div#readercontainer").css("line-height");
varlineheightnum=parseint(lineheight);
if(lineheightnum==46){
$("#hang-da").html("t");
}
//添加cookie记录
setcookie("readsetlineheihgt",linehn,30);
}
});
//切换阅读背景颜色
$("d_bgdlspan").each(function(index,element){
$(this).click(function(){
varbackcolorvalue=$(this).attr('ss');
$("body").removess();
$("body").addss(backcolorvalue);
//添加cookie记录
setcookie("readsetbackground",backcolorvalue,30);
});
});
//切换关灯效果
$("div.book_titlexet").toggle(function(){
$("#qiehuancss").attr('href',"-");
$("div#readercontainer").css("color","#666");
$(".lilighttxet").text('开灯');
//添加cookie记录
setcookie("readsetbackground","rbgcloselight",30);
},function(){
$("#qiehuancss").attr('href',"");
$("div#readercontainer").css("color","rgb(0,0,0)");
$(".lilighttxet").text('关灯');
//添加cookie记录
setcookie("readsetbackground","rbgopenlight",30);
});
$("#add_bookcase").click(function(){
vartextcontent=$(this).text();
varjquser=getcookie("jieqiuserinfo");
if(textcontent=='加入书架'){
if(!jquser){
.href="";
returnfalse;
}
vararticle_id="134545";
varchapter_id="6084184";
varpage_=pageidth();
varpage_h=pageheight();
varpage_l=pageleft();
varpage_t=pagetop();
vardialog_=parseint(dth);
vardialog_h=parseint();
vardialog_top=page_t+(page_h/2)-(dialog_h/2);
if(dialog_top(.+?)","igm");
va=(/\r\n/g,"");
varstr=xec)[1];
str=("style=\"idth:500px;margin-top:150px;\"","");
$("#dialog").css("disy","block");
$("#dialog").css("top",dialog_top);
$("#dialog").css("left",dialog_left);
$("#dialo").html(str);
}
『加入书签,方便阅读』