I am working on a web page that is using jQuery. I have an ajax call that gets data from the server an updates a div. Inside that data there is a jQuery function; however, the function is not being called after the data is loaded into the page. I have the proper js files include in the page already.
This is what is returned from the ajax call and placed into a div:
<script type="text/javascript">
$(function() {
$('input').myFunction('param');
});
</script>
<p> other html </p>
How do I get the returned javascript to run after the html is inserted into the page?
(I am using Rails with the jRails plugin )