Javascript syntax error
- by Mel
Hello, I'm wondering if anyone can help me with a syntax error in line 14 of this code:
The debugger says expected ')' after argument list on var json = eval('(' + content ')');
I tried adding a bracket, but it doesn't seem to be working.
// Tooltips for index.cfm
$(document).ready(function()
{
$('#catalog a[href]').each(function()
{
$(this).qtip( {
content: {
url: 'components/viewgames.cfc?method=fGameDetails',
data: { gameID: $(this).attr('href').match(/gameID=([0-9]+)$/)[1] },
method: 'get'
},
api: {
beforeContentUpdate: function(content) {
var json = eval('(' + content ')');
content = $('<div />').append(
$('<h1 />', {
html: json.TNAME
}));
return content;
}
},
});
});
});