Open jupiterplanet opened 11 years ago
Hi,
yes, jqm does not support changing button positions during run time. When the page is compiled jqm (not the adapter) detects two links (before the link phase) and adds ui-btn-left
to the first and ui-btn-right
to the second.
So instead of switching the button elements, you could use one button and change it's label and href on demand.
I have two left buttons in a header. Only one of the two buttons is shown at a time according to a condition. I use the class "ui-btn-left" to position them at the left side of the title as described under http://api.jquerymobile.com/header/ (Controlling button positions with classes).
However, it seems that the class ui-btn-right is added to the second button although it has the class ui-btn-left.
Here is a jsFiddle: http://jsfiddle.net/jupiter/qGQ9U/1/