Here is the line I’m tring to remove the but keep the innerHTML.
<H3 style="TEXT-ALIGN: justify" class="ms-standardheader ms-WPTitle"><A accessKey=W href="/Lists/CACSurveys"><NOBR><SPAN>My Open Surveys</SPAN><SPAN id=WebPartCaptionWPQ1></SPAN></NOBR></A></H3>
End result should look like this:
<H3 style="TEXT-ALIGN: justify" class="ms-standardheader ms-WPTitle"><NOBR><SPAN>My Open Surveys</SPAN><SPAN id=WebPartCaptionWPQ1></SPAN></NOBR></H3>
Reason for this is SharePoint wont let me have web part headrs without links. Thanks in advance!
I ended up using
$('h3.ms-WPTitle > a').replaceWith(function() { return this.innerHTML; });