Javascript syntax error

Posted by Mel on Stack Overflow See other posts from Stack Overflow or by Mel
Published on 2010-06-01T23:39:32Z Indexed on 2010/06/01 23:43 UTC
Read the original article Hit count: 148

Filed under:
|
|

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;
            }
        },
        });
    });
});

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery