user1637402
user1637402

Reputation: 87

how to get all images SRC inside grid-view in Jquery?

i have grid-view display 3 images the first 1 was deleted i want to loop through grid-view images and put it's src into array but ignore images that deleted this image display what i really encountered

my gridview

Upvotes: 0

Views: 1059

Answers (1)

Blazemonger
Blazemonger

Reputation: 92903

var arr = [];
$('#container').find('img,[type=image]').each(function() {
    arr.push(this.src); // stores the absolute src
//  arr.push($(this).attr('src')); // stores the original HTML attribute
});

Upvotes: 2

Related Questions