Forum Discussion
How to Access Dynamically loaded elements in Jquery - Printable Version

+- Forum Discussion (http://forum-discussion.com)
+-- Forum: Coding Problems (http://forum-discussion.com/Forum-Coding-Problems)
+--- Forum: Jquery (http://forum-discussion.com/Forum-Jquery)
+--- Thread: How to Access Dynamically loaded elements in Jquery (/Thread-How-to-Access-Dynamically-loaded-elements-in-Jquery)



How to Access Dynamically loaded elements in Jquery - Reham - 12-07-2017

How to access dynamically created elements in jquery

I am creating a site in php and my site uses Jquery a lot. I am searching how to find dynamically created element jquery. I am unable to access dynamic element with javascript or jquery. Here is the HTML and Jquery code as I create the mileage field with an ajax call.

Code:
<div id="extra-fields" style="display: inline;">
  <div class="form-box">
    <div class="bold divOne">Mileage</div>
    <div class="divTwo">
      <input class="round-5" maxlength="6" size="6" name="mileage" id="mileage" value="" type="text">
    </div>
  </div>
</div>

<script>
    $("#mileage").on('blur', function(e){
        alert('Mileage');
    });
</script>