How to use data attribute values as the context for mark.js?
I’m trying to use Mark.js to find a search value in data attribute values. When a match is found, I’d like to highlight the attribute’s element. In the HTML below, I want to highlight .terms
, when a match is found in the data-definition
value.