0

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.

Patrick
  • 15
  • 3
  • 3
    Please post the code for your ajax call. – Popo Feb 18 '14 at 20:55
  • 4
    'the Javascript fails to see the html that has been displayed by the AJAX.' - one more time, i guess... http://stackoverflow.com/questions/8110934/direct-vs-delegated-jquery-on – sinisake Feb 18 '14 at 20:58

0 Answers0