Im using a text span field and want to select the text inside on click, im not using jQuery, so i wonder if i can do it with java functions?
here is the code:
<div id="container">
<h2> Varför?</h2>
<h3> Usp: </h3>
<div>
<span contenteditable="true" onClick="toggle11();"/ class="text1">
Skrivhär
</span>
</div>
</div>
And my function:
function toggle11() {
var i = document.getElementByClassName("text1")
this.select();
};
Varför?
Usp: