I am trying to select the text inside the span
element by this code but I do not succeed in it:
<span class="selectme">this text should be selected by click</span>
$(".selectme").live('focus', function() { $(this).select(); });
This one, below, is working well:
<input value="this text should be selected by click" class="selectme">
$("input.selectme").live('focus', function() { $(this).select(); });
How can I make it work with the span
element?