I've tried this but it doesn't work:
$(function() {
$('input[type=text]').focus(function() {
$(this).val() == '';
});
});
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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With