I\'ve tried this but it doesn\'t work:
$(function() {
$(\'input[type=text]\').focus(function() {
$(this).val() == \'\';
});
});
A little late but another approach would be this
link text
When you click the input box it will select all the text(not clear) only if it is the default value on the box. That way if a user types something then has to go back to edit it, it's not cleared which could be quite annoying!
Also selecting the text instead of clearing it reminds the user of the example. One to keep in mind i guess.
To set the value, you have to pass the new value as a parameter. This is a funky thing with the .val() jQuery function.
$(this).val('')
take a look at the jQuery API and search for 'val'