p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=560)
-   -   jQuery from Chapter 11 (http://p2p.wrox.com/showthread.php?t=88016)

akumok July 16th, 2012 11:49 AM

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?

Imar July 16th, 2012 12:05 PM

Hi there.

The { after each should be a (

Cheers,

Imar


All times are GMT -4. The time now is 05:05 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.