$('.downmore').click(function(){ var off = $(this).data('off'); if(off==1){ var id = $(this).data('id'); var cate_id = $(this).data('cateid'); var page = $(this).data('page'); var url = "/index.php/index/news/case_more"; $(this).data('off',2); $.post(url,{id:id,cate_id:cate_id,page:page},function(data){ if(data.errcode==1){ $('.downmore').data('id',0); }else{ var datas=data['list']; var str=""; for(var i=0;i"; str +="
"; str +="

"+datas[i]['title']+"

"; str +="

"+datas[i]['abst']+"

"; $('.downmore').data('id',datas[i].id); } $('.ul_case').append(str); $('.downmore').data('off',1); $('.downmore').data('page',page+1); } }) } return false; });