I'm loading a div using this .ajax function:

$.ajax({
    type: "GET",
    contentType: "html",
    url: url,
    async: true,
   success: function (conf) { $("#myDiv").html( conf );}
});

<div id="myDiv">

</div>


In that url that's being loaded I have this jQuery function:

<script type="text/javascript">
    $(document).ready(function() {
        $('#user_list th').hover( function () {
            alert("test test");
        });
    });
</script>

<table id="user_list">
........
........
........
</table>

But this simple function doesn't work. Why not?  If I type the url for
this page directly then the function does work.  How do you get a
jQuery
function to work from a div loaded by ajax? Thanks.

Reply via email to