How to get the properties of all nested objects?

You need to get the src property of all image s on page
Doing so does not work
$(".thumbnails image_picker_selector").find(".thumbnail selected").each(function(){
$(this).find("img").each(function(){
alert($(this).attr("src"));
})
 });


A screenshot of the markup:
73970ac642394ce2b94fbf51b9de111e.PNG
June 26th 19 at 14:13
1 answer
June 26th 19 at 14:15
Solution
$(".thumbnails.image_picker_selector").find(".thumbnail.selected")
BUT WHY the need for spaces to put points?!?!?! - ike37 commented on June 26th 19 at 14:18
: Because these are classes of one element and not nested. Read about CSS selectors - idella_Stoltenberg2 commented on June 26th 19 at 14:21
: but what about the class name in the markup goes here is
"thumbnail selected" and not "thumbnail.selected" - ike37 commented on June 26th 19 at 14:24
Damn, all came! ))))
Thanks for the direction! - ike37 commented on June 26th 19 at 14:27

Find more questions by tags jQuery