ON the display page, I'm loading contents into a container div using ("#mydiv").load("myphpfile.php"); This works fine. My question is, how do I work with elements inside that loaded div?
Here is the code sample:
<div id="contents"></div>
<script type="text/javascript">
  $("#contents").load("___server_side.php");
  $("#message").click(function(){
    console.log('clicked');
  });
</script>
"#message" is an element in the loaded div. How do I access it and assign functions to it from the display page?
 
    