Highlighting text beween custom tags
- by Rachel
In a xhtml, i want to highlight the text between two self closing tags s1 and s2 whose attribute value is the same. Eg. <s1 ind="1"/> and <s2 ind="1" />
Eg.
<html>
<body>
<a>
<b>Some <s1 ind="1"/> text</b>
<c>data <s2 ind="1"/>here</c>
</a>
</body>
</html>
I want "text data" to get highlighted. Is is possible to achieve using javascript/jquery? I could have many such self closing tag pairs s1 and s2 with a unique value for "ind" for the pair indicating that the text within them needs to be highlighted.