What is syntactically wrong with this jQuery?
I'm trying to find the code that's preventing a page from displaying, and
I think this legacy function may be the culprit:
function SetTabOrder() {
$.each([
"#BeginDate",
"#BeginTime",
"#EndDate",
"#EndTime",
"#InputSite-input",
"#cmdAddSite",
"#InputDept-input",
"#cmdAddDept",
"#IncludeDepts",
"#ExcludeDepts",
"#UPCBeginsWith"],
function(i, n) {
$(n).prop("taborder", "y");
}
}
The "each" bit looks wrong, or at least weird, to me, and I appended a
right paren to the right angle bracket, like so:
"#UPCBeginsWith"]),
...but jsFiddle/JSHint tells me, "Missing name in function declaration"
If I remove that paren, it gives me two errors, one on the first line:
Unmatched '{'
...and one on the last line:
"Missing semicolon."
However, adding a semicolon to the end changes nothing.
No comments:
Post a Comment