Delving into Coldfusion, jQuery, HTML5 and Linux

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();

});

§179 · June 5, 2009 · Uncategorized · · [Print]

Leave a Reply

You must be logged in to post a comment.