I have been trying to figure this out for the past few hours at work, and I feel as if I have hit a dead end. I currently have 3 files, editForms.php
, editForms_search.js
, and instant_search.php
.
The user enter's the name of their form name, and as they type AJAX returns the results. The issue is not with displaying information, but rather with the Javascript that I have on editForms.php
.
<script>
$( '.drop_down_show' ).click(function() {
$( "#display_" + this.id ).show();
});
$( '.drop_down_hide' ).click(function() {
$( "#display_" + this.id ).hide();
});
</script>
This is supposed to display more information about the user's form. Now, I have it working without using AJAX (everything in one file under a controlled environment) however when I try to attempt this using AJAX, the Javascript fails to see the html that has been displayed by the AJAX.
Here is my JSFiddle link to the sample that I used to test: http://jsfiddle.net/K9mH8/
TL;DR: Is there an issue that prevents javascript from accessing html elements when the elements were called using AJAX?
Thank you for your help in advance.