What I want to do is use jQuery to find a piece of text within a paragraph and add some CSS to make it bold. I can't seem to figure out why this won't work:
$(window).load(function() {
// ADD BOLD ELEMENTS
$('#about_theresidency:contains("cross genre")').css({'font-weight':'bold'});
});
The text in "about_theresidency" is dynamically pulled in, hence me executing it after the window has loaded.
<div class="content"> <h1>ABOUT US</h1> <span id="about_theresidency"></span>
– Michael Mar 20 '12 at 21:05$('#about_theresidency:contains("cross genre")').wrap("<b></b>");
But to no avail – Michael Mar 20 '12 at 21:08