Dynamic Script with document.ready() not execute at runtime in browser .

Dynamic Script with document.ready() not execute at runtime in browser .

I used jQuery plugin with version 1.8.1 in my page . I created one function which creates dynamic script as per the below code and I place it inside the BODY of the HTML page:

  1.  <script> $(document).ready(function(){ // .... Some javascript }); </script>
The above dynamic script gets some additional HTML and JQuery using AJAX and appends it to the Body tag but it does not execute after Ajax completes. If I add a simple alert('something') like below then it does execute.
  1. <script> alert('something'); $(document).ready(function(){ // .... Some javascript }); </script>

Please tell me what is issue i want execute dynamic script with document.ready() without alert() box ..