Error - Synchronous XMLHttpRequest on the main thread is deprecated
Scris: Mie Dec 02, 2015
Buna, am urmatoarea functie:
Cu ea incarc contentul de pe o alta pagina, insa in consola imi arata urmatoarea eroare:
prntscr.com/99hxm1
Ati mai intilnit asa ceva? Sau poate eu ceva nu fac corect in functia ajax?
Cod: Selectaţi tot
function LoadContent() {
var items = $(".accordion__items");
items.on("click",function(e){
e.preventDefault();
if($(this).hasClass("active")) {
$(this).removeClass("active");
$(this).next().removeClass("open");
} else {
$(this).siblings().removeClass("active");
$(this).next().siblings().removeClass("open");
$(this).toggleClass("active");
$(this).next().toggleClass("open");
$.ajax({
type : "GET",
url : $(this).find('a').attr('href'),
async : true,
data : $('#ProductPageParagraph .text').val(),
success: function (html) {
$('.accordion__content').html(html);
}
});
}
});
}
Cod: Selectaţi tot
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
Ati mai intilnit asa ceva? Sau poate eu ceva nu fac corect in functia ajax?