- No. It is a CSS property, passed as literal string, in order to be interpreted as CSS property by jQuery.
- No. CSS properties are transformed to CamelCase when used in JS. Although jQuery can also take them in the hyphenated form, the author of your example has chosen to camel-case them, so they don’t need to be quoted. (For reasons of readability.)
- No. Semicolons in CSS are used to separate multiple rules. The last rule doesn’t need to be terminated with a semicolon
#foo { color: white }
is perfectly legal in CSS. - No. Semicolons in JS indicate a logical line ending, nothing else. Also, they are optional, if there’s a physical line ending (i.e. a line-break like
\n
) instead.
4
solved Why does this work? (JQuery) [closed]