Closed demonslord closed 11 years ago
@demonslord
buttonMarkup
is a function that is called by many widgets to create the markup for button styled elements (listview buttons, selectmenu, etc.). It is not a widget, so it doesn't have a disable
or refresh
method.
Form buttons (button
and input
type button/submit/reset elements) use the button widget. In this widget there is a call to buttonMarkup()
. The button widget does have disable
and refresh
methods. So this works: http://jsbin.com/axileq/4/edit. Note that in this case there is no need to refresh.
Our button widget API documentation is wrong/confusing: http://api.jquerymobile.com/button/
It also contains information about styling links as buttons. anchor
elements with data-role="button"
don't use the button widget. They don't use any widget at all, we just use buttonMarkup()
to style them, so this information doesn't belong there.
I see there is already a ticket for this issue (https://github.com/jquery/api.jquerymobile.com/issues/85) and will comment there.
Closing this ticket because it's not a bug.
Pretty clear. Thanks.
Answer to my question: adding "ui-disabled" class resolve this problem.
Thanks.
If you define like this:
$("#mybtn").button();
you must enable/disable like this:
$("#mybtn").button("enable");
$("#mybtn").button("disable");
Hi, I noticed that the event disabled doesn't work.
Here live demo: http://jsbin.com/axileq/1/
Best Regards.