I'm new to jquery, and hoping it will make my client side coding more friendly (particularly with regards to ie).
As is usually the case, I've got some code that works nicely in ff, but kicks out an "Expected Identifier" error.
So, I've got two questions:
The above code is part of an anonymous function that gets called by $.getJSON('.... ', function(data){ ...}). I do declare myLive as local within that function: var myLive = " ";
As is usually the case, I've got some code that works nicely in ff, but kicks out an "Expected Identifier" error.
So, I've got two questions:
- What exactly does that mean? What is an "Identifier ," particularly within the context of Internet Explorer and JScript?
- Why am I getting it? The code that is producing the error is below:
Code:
$.getJSON('pages.json.php', function(data) {
var myLive = " ";
var myDelete = " ";
var html = "";
for (var i=0; i<data.sections.length; i++) {
if (!data.sections[i].golive.length) {
} else {
myLive = '<a href="#" onclick="$(\'#';
// Code breaks on the above line
...
}
...
}
...
});
Comment