I am trying to figure out how to select a single snippet of text and then wrap it with an H1. I'm looking for something real light weight as it's only being used in 1 spot on my site. It seems pretty simple, but either the answers have been way too lengthy to bother with or I just can't seem to get it working.
HTML
<div class="innerWrapper">
Office Current Listings
</div>
JS
$('div.innerWrapper:contains("Office Current Listings")').html()
.replace('Office Current Listings', '<h1>Office Current Listings</h1>');
I used the answer from this previous question, but it doesn't seem to work. I put together a demo for it if you'd like to take a look.
Office Current Listings
'));` to change it. – Bali Balo Dec 10 '12 at 20:21