In my Collapsible header I am trying to append an extra anchor tag which is pushed away from the header because this is not supported for JQuery mobile headers. Is there a way to add an extra link/action to the heading of a Collapsible in a neath way?
Thanks in advance
You can inject a button inside the collapsible from the
$(document).on("collapsiblecreate")event, but I prefer to use pre-enhanced markup as described here (this should improve performance during page creation).Here is an example (I believe everybody who is using JQM had such a problem at least one time...)
So, basically, instead of relying completely to the
data-roleenhancement, You need to write in Yourhtmlthe expanded markup and the classes which JQM would add later during the widget initialization. To tell JQM that the markup is pre-enhanced add thedata-enhanced="true"data-attribute to the widget.This way, You are free to add whichever element You want inside any widget (
search-inputs& so on). Just look inside the chrome developer tools: mostly, You will only need to copy-and-paste the markup enhanced by JQM using its own standard method and use that in Yourhtmlpage.