Code to select the content of an input box on click

  1. //set select when clicking on an input
  2. $('input[type=text]').click(function(){
  3. $(this).select();
  4. });

sometimes you want it to occur on focus. replace click(function(){.. by focus(function()...

About Me

Arshad Chummun Hello I'm Arshad. I'm a 21 years old Drupal Web Developer. This is a site i put up for some reasons i can't remember and this is where i write stuffs i need to remember.;)

In the Web world, i head the Drupal Mauritius User Group and the jQuery user Group Mauritius and i'm a campus representative for Mozilla Firefox. 

DrupalCon CPH 2010

Copenhagen August 23 -27

Drupalcon CPH 2010