title: execute a function on page load in jquery mobile
body: <p>I am building a mobile app with Jquery mobile. What you need to know is that I am also working with a content renderer. So I only have one  with data-role page. This is what I do in the content renderer. with &lt;%= incBody %> I get the content of my pages.</p>
  
  <pre><code>&lt;body &lt;%=incBodyAttr%&gt;&gt;
  
  &lt;div data-role="page" class="type-index" data-theme="g"&gt;
  
  &lt;%=incBody%&gt;
  
  &lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>I think that was somewhat that you needed to know. Now the real problem.
  At the moment I have a function load() You can see it over here.</p>
  
  <pre><code>function load(){
  var userId =  $("#userId").val();
  $.ajax({
              url: "~SYSTEM.URL~~CAMPAIGN.URL~/SelligentMobile/Webservice/WebService.asmx/getNieuwtjes",
              type: "POST",
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              data: "{'userId':'" + userId + "'}",
              success: function (response) {       
              var nieuwtjes = response.d;
                if (nieuwtjes.length &gt; 0) {   
                          $.each(nieuwtjes, function (i, entity) {
                      $('#nieuwtjesList').append(
                              $("&lt;li/&gt;").append($("&lt;a/&gt;")
                          .attr("href",'~PROBE(239)~&amp;NEWSID=' + entity.nieuwtjeId)
                      .text(entity.nieuwtjeOnderwerp)
                      )
                      );
                      $('#nieuwtjesList').trigger("create");
                          $('#nieuwtjesList').listview('refresh');     
                    });
              } 
          }        
        });
  }
  </code></pre>
  
  <p>Now this load is triggered by a button at the moment. But what I want to do is that each time the page loads, its executing this function.</p>
  
  <p>Can anybody help ?</p>
  
  <p>kind regards</p>