5
This error occurred in a script of mine, but in my script there is no such line break that the error is showing.
The description of the error is exactly this:
Uncaught Syntax Error: Unexpected Token ILLEGAL
Can anyone tell exactly why this mistake?
The error is happening in the append.
$(function () {
$("body").on("click",".voltar", function(){
$("#fotos").animate({height: 'toggle'});
$("#albuns").animate({height: 'toggle'});
});
$("body").on("click", ".album", function () {
$("#albuns").animate({height: 'toggle'});
$.ajax({
method: 'POST',
url: '../codes/album.php',
data: {
id : $(this).attr('data-id')
},
success: function (result) {
var retorno = JSON.parse(result);
$("#fotos").css("display","initial");
$("#fotos").empty();
$(retorno).each(function(key, value){$("#fotos").append("<div class='col-lg-3 col-sm-3 col-md-3 col-xs-6 center'><img class='img' src=" + retorno[key].URL + "><br /><small>" + retorno[key].NOME + "</small></div>");})
$("#fotos").append("<a class='btn btn-default voltar'>Voltar</a>");
} // fim success
}); // fim ajax
});
})
One detail I forgot to add is that in linux server my previous codes and those that were suggested do not present any error, even because I tested and works well. But in windows server, in which I need this code, is that it is presenting these errors.
Post the part of your code that is in error, it is easier (and possible) to identify.
– Pedro Camara Junior
just a moment I’ll do it
– DiChrist
that’s right, in my code, the append is on the same line, already on the console is not
– DiChrist