I have following content in my view file (.cshtml)

 function FillFeedCharges()
        {
         

           var link;
         
            var idModel = $("#sGroup_cd").val();
            if (idModel != "") {
                $.getJSON("@Url.Content("~/GroupMast/List")", { sGroup_cd: idModel, sCompany_cd :"01"},
                function (data) {
               
              var header = '   '  + '' + '   ' + 'Description' + '' + '   '   +  '' + 'DateStarted' + ''+ '   '  +'' + 'AvgCalories' + '' + '   '  +'' + 'Pounds' + ''  + '   '  +'' + 'Cost' + '' +'' ;
               $('#users table').append(header);
               $.each(data, function (key, val) {
             
                   var user = ''+'+'>Click here' +'' + '   '   + '' + val.Description + '' + '   '   +  '' + val.DateStarted + ''+ '   '  +'' + val.AvgCalories + '' + '   '  +'' + val.Pounds + ''  + '   '  +'' + val.Cost + '' +'';

                 
             
                   $('#users table').append(user);

               });
          });


when i Called 'CallEditDetail' function in  $(document).ready(function ()  it is not callled and give error as 'CallEditDetail not declared' and if i called from outside the $(document).ready(function ()  it is called. Please help me