I am looking for a way to select the text inside a span using jquery when the text is clicked on.
For example in the html snippet below, I want the text \"\\apples\\ora
You can use CSS to do this more easily than JS with style="user-select: all;"
style="user-select: all;"
add cursor: pointer; so its obvious they can click...
cursor: pointer;
See code snippet:
Fruit \\apples\oranges\pears