title: Running jQuery.each() on dynamically created elements
body: <p>I have the following code;</p>
  
  <pre><code>$('#btnSave').click(function (e) {
      $("input:text").each(function (index, value) {
          var el = $(this);
          if (el.val().length == 0) { el.css('border', '1px solid red') }
          return false;
      });
  });
  </code></pre>
  
  <p>Here, all the input text elements are dynamically created hence I can never validate whether they are empty or not..</p>
  
  <p>How do I go and use <code>.on()</code> with <code>.each()</code> ? I googled with no luck.. Thanks in advance..</p>