$(document).ready(function()
{
$('#comment textarea').click(function()
{
if (this.value == this.'Post a comment')
{
this.value = '';
}
});
$('#comment textarea').blur(function()
{
if (this.value == '')
{
this.value = this.'Post a comment';
}
});
});
I have this bit of script stuck on a php file. However it is not functioning. The textarea’s default value is Post a comment. This script should change the textarea’s value to null on click, and then on blur change it back to post a comment.
The followig code should work: