View Single Post
  #1 (permalink)  
Old April 11th, 2012, 02:26 PM
Tulsi Tulsi is offline
Authorized User
Points: 446, Level: 7
Points: 446, Level: 7 Points: 446, Level: 7 Points: 446, Level: 7
Activity: 15%
Activity: 15% Activity: 15% Activity: 15%
 
Join Date: Mar 2011
Posts: 93
Thanks: 22
Thanked 1 Time in 1 Post
Default Few Questions related to jquery code on p.387..

Hi Imar,

I've started the chapter on Jquery and find it very interesting. I was a little confused about a few things related to the code on p.387.

...function().one('focus' function ()
{ this.value='', this.className=''}).addClass('Watermark').css('wid th', '300px');

(1) Why do you need to reset the Css class to an empty string, this.className='' ?

(2) Also, how did you know to set the width to 300px?

Thanks.
Tulsi
Reply With Quote