jQuery .each() method

0 votes
92 views
added Sep 5, 2018 in jQuery by LC Marshal Captain (25,770 points)
recategorized Oct 17, 2018 by LC Marshal
//to print all the elements from element
var floorplanImg = $('.detail-content.floorplan img');

$(floorplanImg).each(function(index) {
  console.log( index + ": " + $(this).attr('src'));
});

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...