AU
Size: a a a
AE
AU
AU
AU
AU
И
$(".search-img img").each(function() {
var image = this;
image.onerror = function() {
const src = $(this).attr("src");
let nesrc;
if(src.indexOf("/1/") !== -1){
nesrc = src.replace("/1/", "/2/");
} else if(src.indexOf("/2/") !== -1){
nesrc = src.replace("/2/", "/1/");
}
$(this).attr('src', nesrc);
}})
AE
AU
ПП
AU
AU
$(".search-img img").each(function() {
var image = this;
image.onerror = function() {
const src = $(this).attr("src");
let nesrc;
if(src.indexOf("/1/") !== -1){
nesrc = src.replace("/1/", "/2/");
} else if(src.indexOf("/2/") !== -1){
nesrc = src.replace("/2/", "/1/");
}
$(this).attr('src', nesrc);
}})
ПП
И
AU
AU
AU
$(this).attr('src', nesrc);
— здесь this у тебя что?И
$(this).attr('src', nesrc);
— здесь this у тебя что?AU
ПП