; before a function in JS
; before a function in JS
- Started
- Last post
- 3 Responses
- dbloc
I just noticed that in the Lite version of the cycle plugin, they put a semi-colon in front of the first function. I've never heard of such a thing. Why would that be there?
;(function($) {
var ver = '2.88';
// if $.support is not defined (pre jQuery 1.3) add what I need
if ($.support == undefined) {
$.support = {
opacity: !($.browser.msie)
};
}
- dbloc0
maybe I'm just a noob
- ********0
// careful: will break
a = b + c
(d + e).print()This is actually evaluated as:
a = b + c(d + e).print();Easy solution: when a line starts with parenthesis, prepend a semicolon to it.
;(d + e).print()
- dbloc0
aha...thanks jadrian