$(document).ready(function () { $('.cqie').click(function(){ var tid = $(this).attr('wow'); var rid = $(this).attr('rid'); var sid = $(this).attr('sid'); var url = ROOT+"/ajax/smore"; $.get(url,{tid:tid,rid:rid,sid:sid},function(con){ if(con.state==200){ var data = con['data']; var gai = data['gai']; var qie = data['qie']; var yuan = data['yuan']; var wen = data['wen']; var wens = data['wens']; if(gai['title']!='' && gai['title']!='null'){ $('#qie1').text(gai['title']); } if(gai['ctitle']!='' && gai['ctitle']!='null'){ $('#qie2').text(gai['ctitle']); } if(gai['bodys']!='' && gai['bodys']!='null'){ $('#qie3').text(gai['bodys']); } $('#qie4').empty(); for(var i=0; i0){ var pic = $('#cpdiv').find("div[class=pic]").eq(1).clone(true); var txt = $('#cpdiv').find("div[class=txt]").eq(1).clone(true); pic.find('a').attr('href',ROOT+'/Authen/'+gai['parentid']+'/'+yuan[0]['id']+'/rid/'+rid+'/sid/'+sid+'.html'); pic.find('img').attr('src',yuan[0]['photo']); txt.find('a').attr('href',ROOT+'/Authen/'+gai['parentid']+'/'+yuan[0]['id']+'/rid/'+rid+'/sid/'+sid+'.html'); txt.find('h4').find('a').html(yuan[0]['title']+''+yuan[0]['names']); txt.find('p').html(yuan[0]['content']+'【详细】'); $('#qie5').append(pic); $('#qie5').append(txt); } if(wen.length>0){ $('#qie6').find('a').attr('href',ROOT+'/Questions/'+wen['id']+'/rid/'+rid+'/sid/'+sid+'.html'); $('#qie6').find('h4').text(wen['c_names']); } $('#qie7').empty(); for(var i=0; i