It appears that the .html function doesn't return javascript. Is there a function that returns both javascript and html?
EDIT:
Example:
Main Page
$.ajax({
url: 'ajaxpage.php',
type: 'post',
data: postvars,
cache: false,
dataType: 'html',
success: function (html) {
$('#content').html($(html).find('#content').html());
}
});
ajaxpage.php
<html>
<body>
<div id="content">
//SOME HTML
<script type="text/javascript">
//SOME JAVASCRIPT
</script>
</div>
</body>
</html>
$(html).find('#content').html() returns
//SOME HTML
while I want
//SOME HTML
<script type="text/javascript">
//SOME JAVASCRIPT
</script>