rendered paste body/*
* Does not work as expected with the following:
*
* <a href="#" id="theVolumeButton" data-role="mybutton" data-inline="true">Show Volume</a>
*/
(function($, undefined) {
$.widget("mobile.mybutton", $.mobile.button, {
options: {
initSelector: ":jqmData(role='mybutton')"
},
_create: function() {
$.Widget.prototype._create.apply(this);
console.log("mybutton._create");
}
});
$(document).bind("pagecreate create", function(e) {
$($.mobile.mybutton.prototype.options.initSelector, e.target)
.not(":jqmData(role='none'), :jqmData(role='nojs')")
.mybutton();
});
})(jQuery);