I am using jQuery Ajax to return a JSON object (with dataType: 'json') from a PHP file. Here is the returned JSON string that the PHP file echoes out.
{'works': true,'text':'<div class=\'animal\'>Elephant</div><br />'}
The Chrome web developer console notes Error:parsererror SyntaxError: Unexpected token '. I do not see, however, where an unexpected single quote could be.
Your JSON is invalid
Use double quotes. Double quotes!