title: jquery mobile - loading content into a div
body: <p>Jquery Mobile works by “hijacking” a page and loading content and injecting it into the page.  </p>
  
  <p>It seems that this creates a problem when i try to inject other content into the page. </p>
  
  <p>I have my index.html and then a page2.html file. I'm setting up jquery mobile in the normal fashion wrapping the contents of each page in a div like so: </p>
  
  <pre><code>&lt;div id="container" data-role="page"&gt;
     // my content
  &lt;a href="page2.html"&gt;go to page 2&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>when the user taps go to page 2, it does the nice slide effect. The url in the location bar looks like this: index.html#page2.html</p>
  
  <p>jquery mobile inject the content of the page using the anchors and applies the transition. nice so everthing works great up to the next part.</p>
  
  <p>On page2.html, i have a section that is loading some external data and injecting it into a div.</p>
  
  <pre><code>&lt;a href="http://www.somedomain.com/myata.php" class="ajaxtrigger" data-role="none"&gt;mydata&lt;/a&gt;
  &lt;div id="target"&gt;&lt;/div&gt;
  &lt;script src="js/code.js"&gt;&lt;/script&gt;
  &lt;script src="js/loader.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
       $('.ajaxtrigger').trigger('click');
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem i am having is that when i enable the transitions in jquery mobile this script doesn't work. It won't load the data into the div. bummer. </p>
  
  <p>Anyone know what i need to do to get it to trigger and load the content into that div?</p>