var content = $(#detailcontent).find(p, br); var midLength = parseInt(content.length/2); if(midLength>20) { content.eq(midLength).after(); }