My JSP has following div
<td class="detail">Hello my name is Bond
<br/>James Bond
</td>
I have to search whether the class "detail" has sub string "Bond James Bond"
As Bond James bond has "br" in middle, how can I search that whether this string has the substring
I have tried multiple combinations of /n and br in the jQuery to display
alert($('.detail').text().toLocaleLowerCase().indexOf('bond\n james bond'));
and
alert($('.detail').text().toLocaleLowerCase().indexOf('bond<br> james bond''));
but it always return -1. help me out thanks in advance