Data in p tags not rendering when calling via AJAX
Hello,
I have a PHP page the renders input fields and then my main page calls them in via AJAX. Here is a sample of what the PHP page generates:
- <p class="fieldLabel">Select Date:</p><input name="field_1" id="field_1" type="text" class="inputTextDatePicker" placeholder="" value="" maxlength="10" /><br />
Then, on my main page, I use the AJAX success handler to perform the following:
- jQuery('#div-custom').html(result).show();
- jQuery("#div-custom").find(".inputTextDatePicker" ).datepicker({
- numberOfMonths: 2,
- dateFormat: "yy-mm-dd",
- changeMonth: true,
- changeYear: true,
- showButtonPanel: true
- });
- }
The issue that I'm having, is that the text in my paragraph tags (Select Date) in this case, aren't showing. However, if I call the php page directly, they appear. Wondering if I need to add any additional options when initializing date picker within the success handler?
I am admittedly very weak when it comes to jQuery so appreciate the help very much!!