I have an AJAX response that returns information using $_GET and is then set as the HTML of a container. This works in Chrome, Safari, FireFox, Opera, but not IE8.
$(function() {
$('#content .entry-content a.mais-menos').click(
function(){
$('#content .entry-content a.mais-menos').css('background-position','bottom left');
if($(this).siblings('.descricao-campanha').css('display')=='block'){
$(this).css('background-position','bottom left');
$(this).siblings('.descricao-campanha').slideUp(1000);
}else{
$('#content .entry-content .descricao-campanha').slideUp(1000);
$(this).css('background-position','top left');
$(this).siblings('.descricao-campanha').slideDown(1000);
var mae = $(this).siblings('.descricao-campanha');
var codigo = $(this).siblings('.cdPost').attr('value');
if (mae.children('.carregando').is(":visible")){
$.get('= get_bloginfo("url") ?>/get_associado.php', {cd:codigo}, function(retorno) {
// mae.children('.carregando').hide();
mae.html(retorno);
// alert(retorno);
});
}
}
return false;
}
);
});
If I alert retorno I can see that the data has been returned, but when I append it to the div, it fails in IE8.
Can someone please help me understand why this fails and how to resolve it?
This is what Retorno return, in case of no image.