I'm trying to use jQuery to select and copy the text inside the h2 element when i double click the h2 element. (this is with no jQuery involved at all, just the default selecting in browers)
The issue i'm running into is that when i double click it selects less then what i want it to select. when i click 3 times it just selects the whole page.
This is my first post so I don't really know what code I should provide. And I don't have any jQuery written for this yet.
html:
<body>
<h1>Owl PvP</h1>
<h2>play.owlpvp.net</h2> <!--This is the part i want to be selected-->
<figure>
<img id="mute" src="images/audio-off.svg">
</figure>
<nav>
<ul>
<li><a href="http://webshop.owlpvp.net">shop</a>
</li>
<li><a href="http://forums.owlpvp.net">forums</a>
</li>
<li><a href="/staff">staff</a>
</li>
<li><a href="#serverstatus">Server</a>
</li>
</ul>
</nav>
<div id="overlay">
</div>
</body>
This is what happens when click 3 times, it just selects "owlpvp" when i double click.