I am looking to calculate the margin left and right for children of a flex item
<div class="sec images" style="display:flex;justify-content:space-between">
<img src="images/en_mb-mega-01.png" alt="">
<img src="images/en_mb-mega-03.png" alt="">
<img src="images/en_mb-mega-04.png" alt="">
</div>
While attempting to loop through the children, I found that it only provides me with the width of the child element. I actually need both the width and margins.
Note:
$(element).width()
did not work as expected
main.js file :
var current_item_children = current_item.children();
$.each(current_item_children, function () {
var this_item = $(this);
children.push(
{
width: this_item.width(),
outerWidth:this_item.outerWidth(false),
height: this_item.height(),
}
);
});