Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery Mobile trigger('create') command not working
    primarykey
    data
    text
    <p>JQuery Mobile is making my cry tonight. I'm trying to build custom controls so I don't repeat certain elements through my app, and it's giving me a hard time. Specifically, I have the following in an HTML file:</p> <pre><code>&lt;div id="custom-header" data-role="header" data-position="inline" data-theme="f"&gt; &lt;a href="index.html" data-icon="back" style="margin-top:5px" data-theme="b"&gt;Back&lt;/a&gt; &lt;div style="text-align: center; padding-top: 5px; padding-bottom: 3px"&gt;&lt;img src="../images/logo.png" &gt;&lt;/div&gt; &lt;a href="index.html" data-icon="home" style="margin-top:5px" data-theme="b"&gt;Home&lt;/a&gt; &lt;/div&gt; </code></pre> <p>In my main file I'm essentially doing:</p> <pre><code>&lt;script src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"&gt;&lt;/script&gt; &lt;div data-role="page" id="test-console" data-theme="m"&gt; &lt;div id="me-header"&gt;&lt;/div&gt; &lt;script&gt; $.get('header.html', function (retData) { $('me-header').html(retData).trigger('create'); }); &lt;/script&gt; &lt;/div&gt; </code></pre> <p>So here's the problem - The header doesn't render the same as it does as when I paste the contents of header.html directly into my JQM page. It almost feels like trigger('create') isn't doing anything.</p> <p>Any ideas? I've burned about three hours and tutorials like <a href="http://jquerymobiledictionary.pl/faq.html">http://jquerymobiledictionary.pl/faq.html</a> don't seem to be applying..</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload