Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header does not position buttons with ngm-if correctly #217

Open
jupiterplanet opened this issue Jul 11, 2013 · 1 comment
Open

Header does not position buttons with ngm-if correctly #217

jupiterplanet opened this issue Jul 11, 2013 · 1 comment

Comments

@jupiterplanet
Copy link

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/

@tbosch
Copy link
Contributor

tbosch commented Aug 1, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants