});
$("#subs_expand_all").live("click",function(){
loading();
$("#subs_expand_all").die("click");
book_id $(this).attr(\'data-book_id\');
uid $(this).attr(\'data-uid\');
$.ajax({
type: "get",
url: \'/ne/ks_user/subscription/getChapterListAll\',
data: \'book_id\'+book_id,
dataType: "json",
success: function(msg){
chapter_count 0;
goldsum 0;
();
if(.de ! 0)
{
alert(.);
return false;
}else{
var html \'\',
data_len .;
// $.each(, function(i,item){
$("#chapter_more_table tr:gt(0)").remove();
$.each(.data ,function(i, n){
//$("#chapter_more_table").html(\' 选择书名章节名字数需要看书币订阅状态\') ;
html \' \' ;
if(_subscription!1){
html +\' \' ;
goldsum goldsum+parseInt(_price);
chapter_count++ ;
}else{
html +\' \';
}
html +\' \'+n.book_name+\'\' ;
subhtml \'\' ;
if(!\'\'){
subhtml \'第\'++\'章 \';
}
html +\' \'+subhtml+_name+\'\' ;
html +\' \'+ze+\'\' ;
html +\'\'+_price+\'\' ;
subhtml \'\' ;
if(_subscription1){
subhtml \'已订阅\';
}else{
subhtml \'未订阅\';
}
html +\'\'+subhtml+\'\' ;
html +\'\' ;
$("#chapter_more_table tr:last").after(html);
});
$(\'#chapterSum\').html(chapter_count) ;
$(\'#goldsum\').html(goldsum) ;
$(\'#sumEgold\').html(goldsum) ;
if(parseInt($(\'#goldsum\').html())>parseInt($(\'#noEgold\').html())){
shoRequest();
}
$(\'#subs_expand_all\').html(\'收起章节列表\') ;
//$(\'bs_expand\').css(\'color\',\'#CCC\');
$(\'bs_expand\').css(\'color\',\'#CCC\');
$("bs_expand").die("click");
$("#subs_expand_all").die("click");
$(\'#subs_expand_all\').live(\'click\',function(){
hiddenChapterAll() ;
}) ;
//$(\'#subs_expand_all\').css(\'color\',\'#CCC\');
//去掉展开更多章节的提示
page9999;
}
}
});
$("bs_list").css({height:"auto"}) ;
});
})
//隐藏章节
function hiddenChapterAll(){
loading();
setTimeout(\'hiddenChapterAllTimeOut()\' , 1000) ;
//hiddenChapterAllTimeOut() ;
}
function hiddenChapterAllTimeOut(){
$("#chapter_more_table tr:gt(4)").hide() ;
$("#chapter_more_table tr:gt(4) :checkbox").attr(\'checked\',false) ;
/*
$("#chapter_more_table tr:gt(0)").each(function(i, n){
if(i>3){
$(this).hide();
}
});
*/
goldsum 0 ;
chapter_count 0 ;
$("#chapter_more_table tr:visible").each(function(i, n){
if($(this).children().children(":checkbox").attr(\'disabled\')false&&$(this).children().children(":checkbox").attr(\'checked\')&&i!0){
goldsum goldsum+parseInt($(this).children(\'td:eq(4)\').children().html());
chapter_count++ ;
}
});
$(\'#chapterSum\').html(chapter_count) ;
$(\'#goldsum\').html(goldsum) ;
$(\'#sumEgold\').html(goldsum) ;
$("#subs_expand_all").die("click");
$(\'#subs_expand_all\').html(\'展开全部章节\') ;
$(\'#subs_expand_all\').live(\'click\',function(){
shoChapterAll() ;
}) ;
$("bs_expand").die("click");
$(\'bs_expand\').css(\'color\',\'#0099FF\');
$(\'bs_expand\').live(\'click\',function(){
shoChapterMore() ;
}) ;
if(parseInt($(\'#goldsum\').html())3){
if(k>clickMpre){
clickMpre 9 ;
count_num++ ;
return false;
}
if($(this).is(":hidden")){
$(this).sho();
k++ ;
}
}
if($(this).children().children(":checkbox").attr(\'disabled\')false){
goldsum goldsum+parseInt($(this).children(\'td:eq(4)\').children().html());
$(this).children().children(":checkbox").attr(\'checked\',true) ;
chapter_count++;
}
});
$(\'#chapterSum\').html(chapter_count) ;
$(\'#goldsum\').html(goldsum) ;
$(\'#sumEgold\').html(goldsum) ;
if(parseInt($(\'#goldsum\').html())>parseInt($(\'#noEgold\').html())){
shoRequest();
}
if((count_num1&&k>6)||(count_num>1&&k3){
$(this).hide();
}
});
*/
}
//显示章节
function shoChapterAll(){
loading();
setTimeout(\'shoChapterAllTimeOut()\' , 1000) ;
}
function shoChapterAllTimeOut(){
$("#chapter_more_table tr:gt(4)").sho() ;
chapter_count parseInt($(\'#chapterSum\').html()) ;
goldsum parseInt($(\'#goldsum\').html()) ;
$("#chapter_more_table tr:visible").each(function(i, n){
if($(this).children().children(":checkbox").attr(\'disabled\')false&&$(this).children().children(":checkbox").attr(\'checked\')false){
$(this).children().children(":checkbox").attr(\'checked\',true) ;
goldsum goldsum+parseInt($(this).children(\'td:eq(4)\').children().html());
chapter_count++ ;
}
});
/*
$("#chapter_more_table tr:gt(0)").each(function(i, n){
if(i>3){
$(this).sho();
}
});
*/
$(\'#chapterSum\').html(chapter_count) ;
$(\'#goldsum\').html(goldsum) ;
$(\'#sumEgold\').html(goldsum) ;
$("#subs_expand_all").die("click");
$(\'#subs_expand_all\').html(\'收起章节列表\') ;
$(\'#subs_expand_all\').live(\'click\',f
登录信息加载中...