$('.allselect').live('mouseup', function() { $(this).select(); });
input{margin:50px;}
<input value="foo bar" class="allselect">