0

My following code gives the error message this is not a function (see code-snippet line 8). How do I correctly call it then?

((e) => {
  if(e.children == null || e.children.length == 0) return;
  e = e.children;
        
  $(e).each( (i, o) => {
    console.log(o);
    this(o);
  })

})(document.body);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
mardari
  • 25
  • 3

0 Answers0