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