+ 1
Two attr of img are equal
There are several images. Images have the same classname. They have attributes like data-src and src. In each img these two attr need to be equal. How to do this in jQuery?
1 ответ
+ 2
$('*').each(function (){
If($(this).is('img')){
let data = $(this).attr('data-src');
$(this).attr('src', data);
}
});