/* * Does not work as expected with the following: * * Show Volume */ (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);