I\'m trying to append my header (date-role=header
) dynamically in jquery mobile 1.4.1. I\'m adding a button to the right side of it and I\'m using $(\'#pa
The way to insert toolbars in jQuery Mobile 1.4 is different, .toolbar()
function should be called on header/footer inserted dynamically.
$("[data-role=header], [data-role=footer]").toolbar();
And then, page's height should be reset as toolbars add padding to page causing page to scroll.
$.mobile.resetActivePageHeight();
The .trigger("pagecreate")
and .trigger("create")
are deprecated and replaced with .enhanceWithin()
. The new function should be called on parent div containing the dynamically add elements.