Upon page loading, I want to find all text in the body that is encapsulated in parenthess (here\'s an example) and replace it with the following:
<
I think this is what you're looking for. Use regex to find and replace "((" and "))". Given this content:
without my having to actually DO anything special with the content? I could get in the habit of doubling up on the parenthesis if that helps ((like this would be a tooltip)) but (this would not).
This code will search it and replace with your icon.
var target = document.getElementById('content'),
str = target.innerHTML,
pre = '';
str = str.replace(/\(\(/g, pre).replace(/\)\)/g, post);
target.innerHTML = str;
Here's a jsfiddle: https://jsfiddle.net/mckinleymedia/fzn4trmL/
The title attribute doesn't have a lot of flexibility and this will have problems. You'd be much better off just surrounding the text by the icon, like so:
like this would be a tooltip
But then you need to have the tooltip show the html in the icon instead of the title.