I’m trying to add a data-add-back-btn="true" to a element via jQuery. How can i afhief this?
I’ve been looking for an option but i haven’t been successfull so far.
Perhaps someone here can be of some help.
<div data-role="page" id="item" data-add-back-btn="true">
<div data-role="header" data-position="fixed">
<h1>ProjectName</h1>
</div>
<div data-role="content">
<h1 id="newsTitel"></h1>
<p id="newsContent"></p>
</div>
</div>
this is the block. the button is now hardcoded but I want it to be dynamica added.
To do this, you will need to add addBackBtn to jQuery Mobile’s initialization event, like this: