I've posted messages here quite a few times recommending single quotes for
the very reason that Josh mentioned. If you use double quotes you have to
either escape the double quotes in HTML attributes, or use single quotes for
the HTML attributes (which is invalid although it does work), or switch to
single quotes for those strings. Easier to just use single quotes routinely.

-Mike
 
> From: Bill
> I've wondered about this myself. I seem to go back and forth 
> between the two without any rhyme or reason. Looking forward 
> to more responses on this thread.

> > From: Andy Matthews
> > Yes. I am. Plus single quoting is slightly faster due to its
> > "lower case" nature. No need to hold down the shift key.

> > > From: Josh Powell
> > > I've started using a single quote inside of all $() when quotes
> > > are needed because it makes creating DOM elements much
> > > simpler. $('<a href="/path"></a>') or
> > > $('<div id="anId"></div> and for consistency
> > > doing $('#anId').   Anyone else doing the same thing?

Reply via email to