How can I search for text which has any of below properties shown below.
.css('font-weight', 'bold');
.css('font-style', 'italic');
.css('text-decoration', 'underline');
<b> Some Text </b>
<u> Some Text </u>
<i> Some Text </i>
I want to replace the text like this
var body = $('body');
var replaced = body.html().replace(text,'<span class="hasStyle">'+text+'</span>');
$('body').html(replaced);
1) First part of your block is for setting values.
2) please try this