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

Reply via email to