I know this is something easy but I just can't see it. Can anyone tell me why I am getting the error "missing } after property list" for the following code:
var $newCandleDialog = $('<div></div>')
.load('/prodash/dash_access.php?urlInit=candles/getCanStatus.php','it='+newData)
.dialog({
autoOpen: false,
title: 'Active Mode: New Candles!',
modal: true,
buttons: {
"Load new candles": function() {
$("#canHint").load('/prodash/dash_access.php?urlInit=candles/getcandles.php','q=0&show=05&strength=00');
$( this开发者_如何学编程 ).dialog( "close" );
}
Cancel: function() {
$( this ).dialog( "close" );
}
}
});
Firebug starts the error with the "Cancel: function" line.
Thank you in advance!
You are missing a ,
before Cancel:
.
JSlint is very good at detecting stuff like this.
You need a comma between each key/value pair.
{
foo: { },
bar: { }
}
You don't have one between the value for the buttons
property and the key for the Cancel
property.
精彩评论