View Single Post
  #1 (permalink)  
Old April 11th, 2012, 02:26 PM
Tulsi Tulsi is online now
Friend of Wrox
Points: 560, Level: 8
Points: 560, Level: 8 Points: 560, Level: 8 Points: 560, Level: 8
Activity: 18%
Activity: 18% Activity: 18% Activity: 18%
 
Join Date: Mar 2011
Posts: 115
Thanks: 32
Thanked 2 Times in 2 Posts
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