Sean, Attributes in (X)HTML don't need to be double-quoted, again single-quotes are equally valid there so '<a href="...">' and "<a href='...'>" are effectively the same and both valid. I know you probably know, I just wanted to rephrase "It is easier to type an html string if you use single quotes:" in case :-)
--rob On 7/26/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
On 7/26/07, Mitchell Waite <[EMAIL PROTECTED]> wrote: > This going will make me sound really dumb but what is the difference between > using single quote versus double quotes in jQuery, e.g. Mitchell, the concept of single vs double quotes is more of a javascript question. The simple answer is that there's no difference really. It is easier to type an html string if you use single quotes: Single: var html = '<a href="#">link</a>'; Double: var html = "<a href\"#\">link</a>'; But sometimes you might want to use double instead: Single: var str = 'I\'m in love'; Double: var str = "I'm in love"; So just use whichever you feel is better for the situation. Some people are used to single quotes representing characters, whereas others think html = double quotes, javascript = single quotes. ~Sean
-- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 "There's a whale there's a whale there's a whale fish" he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.