Creative Notice

exploring creativity 
« Back to blog

jQuery: Select Input Text

It never fails, I always fail to remember how to select in input's content on focus. Here's the magic code in jQuery.


// Select textbox content
$("input[type=text]").focus(function() {
$(this).select();
});


Loading mentions Retweet

Comments (0)

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    twitter