title: Append not working when loading new page
body: <p>I am trying to load data into a <code>div</code> using <em>JavaScript</em> when the page loads. I'm using <em>jQuery Mobile</em>. The page is called using normal <code>href</code>, which I assume gets hijacked into <code>ajax</code> by <em>jQM</em>.</p>
  
  <p>But my JavaScript seems to behave somewhat strangely, all the script runs (I checked that using <code>alert</code>s), but the <code>append</code> function doesn't seem to have any effect on the page. I've tried all sorts of fuctions: <code>pagecreate</code>, <code>pagebeforeshow</code>, <code>document.ready</code>.</p>
  
  <p>Here is relevant part of my code:</p>
  
  <pre><code>&lt;body&gt;
  &lt;div data-role="page" id="page"&gt;
      &lt;div data-role="content" style="padding:0" data-theme="k"&gt;      
          &lt;ul class="rig columns-3" style="margin:0;padding-left:0;padding-right:8px;padding-top:20vw" id="DrinkGridView"&gt;        
              &lt;!-- &lt;li&gt;
                  &lt;img src="images/logo.png" /&gt;
                  &lt;h3&gt;Image Title&lt;/h3&gt;
                  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit...&lt;/p&gt;
              &lt;/li&gt; --&gt;   
          &lt;/ul&gt;
      &lt;/div&gt;&lt;!-- /content --&gt;         
      &lt;script type="text/javascript"&gt;
          //$( document ).delegate("#page", "pageinit", function() {
          var global_id;
          var global_data;
          var fields = [];
  
          $.ajax({                    
              type: "POST",
              url: "http://192.168.1.120/yiibootstrap_old/index.php/userregistration/makedrink",
              cache: false,
              success: function(data)
              {
                  var obj = $.parseJSON(data);
                  $.each(obj, function() 
                  {                           
                      fields.push({id:this['id'],name:this['name'],image:this['image'],Description:this['description']});            
                  });
              var count = fields.length;                 
              count1 = parseInt(count);
              for (var r = 0; r &lt; count1; r++)
              {
                  $('#DrinkGridView').append('&lt;a id="inline" href=#data&gt;&lt;li id="' + fields[r]['id'] + '"&gt; &lt;img src="http://192.168.1.120/yiibootstrap_old/uploads/' + fields[r]['image'] + '"/&gt; &lt;h3&gt;&lt;b&gt;' + fields[r]['name'] + '&lt;/h3&gt; &lt;p id="sss"&gt;' + fields[r]['Description'] + '&lt;/p&gt; &lt;/li&gt;&lt;/a&gt;').children().last().trigger("create");
                  // THIS APPEND IS NOT SHOWING RESULT !!
              }
          });
          //});    
      &lt;/script&gt;   
  &lt;/div&gt;&lt;!-- /page --&gt;
  &lt;/body&gt;
  </code></pre>