var indexTerms = ' <ul id="indexList"> <li> <div> <a href="cmn_contact.html" target="contentwin"> Contact Information </a> <a href="cmn_contact.html" target="contentwin"> [1] </a> </div> </li> </ul> '; $("#indexBlock #iList").html(indexTerms); $('#indexList li a').each(function() { var old = $(this).attr('href'); if (withFrames) { $(this).attr('href', normalizeLink(old)); } else { $(this).attr('href', '#' + normalizeLink(old)); $(this).removeAttr("target"); } });