I am displaying an address as below. I would like the user to be able to click on any part of the address and have the inner html of the two nested divs be highlighted, so they can then copy to clipboard. This would be the same result as simply holding down left mouse and dragging the cursor from the beginning of the address to the end.
<div id="my-id">
<div >1 Main St</div>
<div >Anytown, KY</div>
</div>
Looking for a JavaScript solution.
thanks!