I want to use jQuery to highlight a character of a string on a webpage at an index of some value. The value is variable – one time it will be at the index of 2, and the ne
You can do this with HTML and CSS.
Then highlight it dynamically with CSS classes and Jquery.
$("#textholder").html("Here is some Highted text");
Then your CSS could be:
.highlight { display:inline-block; background-color:"yellow"; }
https://jsfiddle.net/aaronfranco/x3h4qnxj/1/