Javascript\JQuery function does not work without an alert
<p>I have a problem with my 2 JQuery\Javascript functions. My problem is that when I dont have alerts in both my functions, both the functions don't work properly, and the event agument and eventtarget parameters are overwritten.</p>

<p>please advise on the solution for this.</p>

<pre><code> function SubmitAdded() {

      $(document).ready(function (){
      var arrAdded = new Array();
      $('#JQAddedList li').each(function (i) {
          arrAdded[i] = $(this).text();
      });

          __doPostBack("AddActivity", arrAdded);
         // alert('if this alert is commented out, function does not work.');

 });
  }
</code></pre>
