jQuery from Chapter 11
Have a problem to run jQuery code from p. 387
$(function ()
{
$(':input[type=text], textarea').each
{
function()
{
var newText = 'Please enter your ' +
$(this).parent().prev().text().toLowerCase().trim();
$(this).attr('value', newText);
}).one('focus', function()
{
this.value = '', this.className = ''
}).addClass('Watermark').css('width', '300px');
});
I'm thinking somewhere } brace is missing. Any ideas?
|