Reputation: 254
i want to add footer dynamically in my jquery mobile page..
<div data-role="page" id="homePage" data-theme="b" data-add-back-btn="true">
<div data-role="header"><h3></h3></div>
<div data-role="content">
<ul data-role="listview" id="aaa">
</ul>
</div>
the i tried to add footer dynamically..
$('#homePage').append('<div data-role="footer" data-position="fixed"><i>Copyright © 2013</i></div>').trigger( "create" );
but it doesn't work for me.
Upvotes: 2
Views: 3724
Reputation: 2432
see this fiddle
$('#homePage').append('<div data-role="footer" data-position="fixed"><i>Copyright © 2013</i></div>').trigger( "pagecreate" );
I have used the same code from the template of jquery website. CSS needs to be managed for this.
EDIT as pointed in below comment:
Upvotes: 3