I'm currently developing a PhoneGap Application for Android using JQuery Mobile. All i want, is to dynamically change the header text of a collapsible:
<div data-role="collapsible" id="collapse">
<h3>I'm a header</h3>
<p>I'm the collapsible content</p>
</div>
That code is from demos.jquerymobile.com. Chrome DevTools gives me the following html for this example: http://ift.tt/1HCVBut
For any reason, if i copy exactly the same code to my index.html and run it, chrome DevTools gives me the following html: http://ift.tt/1Gt3UWD
Why are there different html codes?
I actually can change the header's text by
$("#collapse").text("new text");
but then it looses all the styling and also
$("#collapse").trigger('create').
doesn't do anything. What am I doing wrong?
Aucun commentaire:
Enregistrer un commentaire