I built an Android app a while ago using jQuerymobile 1.3.2. The app created buttons by injecting hyperlink tags and calling .button() on them, then later on, once clicked, called remove() to drop them back out again. E.g:
<a class="jsButton" href="..." data-role="button" data-ajax="false">More...</a>
function doSearchMore(e) {
e.preventDefault();
jQuery(this).remove();
...
}
I'm now updating to jQuerymobile 1.4.2, and this code is no longer working. It seems .button() causes additional mark-up to wrap the hyperlink, so jQuery(this).remove() on the hyperlink then only removes the inner element, leaving the wrapping markup behind. It's possible that this was happening already but has now been emphasised by new styling.
Can somebody advise on how I should be removing the button upon click please?