title: I get 'TypeError: t.nodeName is undefined' whevever I use 'this' keyword to iterate through and get values from the input fields in my HTML form
body: <p>I have a HTML form with some input fields and I want to check for empty fields using jQuery by using the <code>this</code> keyword but I can't figure out the reason of error that I'm getting: </p>
  
  <blockquote>
    <p>TypeError: t.nodeName is undefined</p>
  </blockquote>
  
  <p>This is the javscript code of what i've tried:</p>
  
  <pre><code>$(document).ready(()=&gt;{
      $("#submit-btn").click(()=&gt;{
          $(".myform input").each(()=&gt;{    
              if($(this).val().length == 0) {
                  $(this).css("border", "2px solid red");
              }
          });
      });
  });
  </code></pre>
  
  <p>I can't figure out why I am getting the error because I saw someone suggest this exact code in some another similar question but I can't get the output I expected. So before you mark this question for 'duplicate', at least help me with the answer.</p>