首页

第186章 生死之道(2 / 3)

}

() ;

});

});

//滚屏 end

/*颜色*/

//背景色改变

$(''#background'').click(function (){

var selected = $(''#background'').parent().parent().children(".select") ;

() ;

});

$(''#background1'').click(function (){

var selected = $(''#background1'').parent().parent().children(".select") ;

() ;

});

$(''.select'').parent().each(function (){

$(this).mouseover(function (){

$(this).children(".select").sho() ;

}) ;

});

$(''.select'').parent().each(function (){

$(this).mouseout(function (){

$(this).children(".select").hide() ;

}) ;

});

$(''#background'').parent().parent().children(''.select'').children(''p'').each(function(){

$(this).click(function(){

$(''#background'').val($(this).html()) ;

$(''#background'').parent().parent().children(''.select'').hide() ;

$(".ydleft").removeClass($(''#background2'').val());

$("body").removeClass($(''#background2'').val());

$("body").attr(''style'' , '''') ;

$(".ydleft").attr(''style'' , '''') ;

$(''#background2'').val($(this).attr(''class'')) ;

$(".ydleft").addClass($(this).attr(''class''));

$("body").addClass($(this).attr(''class''));

});

});

//背景色改变 end

//文字大小

$(''#fontSize'').click(function (){

var selected = $(''#fontSize'').parent().parent().children(".select") ;

() ;

});

$(''#fontSize1'').click(function (){

var selected = $(''#fontSize1'').parent().parent().children(".select") ;

() ;

});

$(''#fontSize'').parent().parent().children(''.select'').children(''p'').each(function(){

$(this).click(function(){

$(''#fontSize'').val($(this).html()) ;

$(''#fontSize'').parent().parent().children(''.select'').hide() ;

$(".yd_text2").removeClass($(''#fontSize2'').val());

$(''#fontSize2'').val($(this).attr(''class'')) ;

$(".yd_text2").addClass($(this).attr(''class''));

});

});

//文字大小 end

//字体

$(''#fontFamily'').click(function (){

var selected = $(''#fontFamily'').parent().parent().children(".select") ;

() ;

});

$(''#fontFamily1'').click(function (){

var selected = $(''#fontFamily1'').parent().parent().children(".select") ;

() ;

});

$(''#fontFamily'').parent().parent().children(''.select'').children(''p'').each(function(){

$(this).click(function(){

$(''#fontFamily'').val($(this).html()) ;

$(''#fontFamily'').parent().parent().children(''.select'').hide() ;

$(".yd_text2").removeClass($(''#fontFamily2'').val());

$(''#fontFamily2'').val($(this).attr(''class'')) ;

$(".yd_text2").addClass($(this).attr(''class''));

});

});

//字体 end

//文字颜色改变

$(''#fontColor'').click(function (){

var selected = $(''#fontColor'').parent().parent().children(".select") ;

() ;

});

$(''#fontColor1'').click(function (){

var selected = $(''#fontColor1'').parent().parent().children(".select") ;

() ;

});

$(''#fontColor'').parent().parent().children(''.select'').children(''p'').each(function(){

$(this).click(function(){

$(''#fontColor'').val($(this).html()) ;

$(''#fontColor'').parent().parent().children(''.select'').hide() ;

$(".yd_text2").removeClass($(''#fontColor2'').val());

$(''#fontColor2'').val($(this).attr(''class'')) ;

$(".yd_text2").addClass($(this).attr(''class''));

});

});

//文字颜色改变 end

//保存按钮 , 恢复按钮

$("#saveButton").click(function (){

$.cookie(''screen'', $(''#screen'').val(), { path: ''/'',expires: date});

$.cookie(''background'', $(''#background2'').val() , { path: ''/'',expires: date});

$.cookie(''fontSize'', $(''#fontSize2'').val() , { path: ''/'',expires: date});

$.cookie(''fontColor'', $(''#fontColor2'').val() , { path: ''/'',expires: date});

$.cookie(''fontFamily'', $(''#fontFamily2'').val() , { path: ''/'',expires: date});

alert(''保存成功'') ;

}) ;

$("#recoveryButton").click(function (){

$(''body'').removeClass($.cookie(''background'')) ;

$(''body'').removeClass($(''#background2'').val()) ;

$(''.ydleft'').removeClass($(''#background2'').val()) ;

$(''.ydleft'').removeClass($.cookie(''background'')) ;

$(''body'').attr(''style'' , ''background:#E5F2F7'') ;

$(''.ydleft'').attr(''style'' , ''background:#F2F8FB'') ;

$(''.yd_text2'').removeClass($(''#fontSize2'').val()) ;

$(''.yd_text2'').removeClass($.cookie(''fontSize'')) ;

$(''.yd_text2'').removeClass($(''#fontColor2'').val())

$(''.yd_text2'').removeClass($.cookie(''fontColor'')) ;

$(''.yd_text2'').removeClass($(''#fontFamily2'').val()) ;

$(''.yd_text2'').removeClass($.cookie(''fontFamily'')) ;

$.cookie(''screen'', '''' , { path: ''/'',expires: date});

$.cookie(''background'', '''' , { path: ''/'',expires: date});

$.cookie(''fontSize'', '''' , { path: ''/'',expires: date});

$.cookie(''fontColor'', '''' , { path: ''/'',expires: date});

$.cookie(''fontFamily'', '''' , { path: ''/'',expires: date});

$(''#screen'').val(''滚屏'') ;

$(''#background'').val(''阅读底色'') ;

$(''#background2'').attr(''value'',''#CCCCCC'') ;

$(''#fontColor'').val(''字体色彩'') ;