Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Demo pages for buttons have me confused #8335

Closed
SteveALee opened this issue Nov 25, 2015 · 2 comments
Closed

Demo pages for buttons have me confused #8335

SteveALee opened this issue Nov 25, 2015 · 2 comments
Labels

Comments

@SteveALee
Copy link

Reading the button Widget page I got a little confused.

  • "Enhanced" buttons - I spent a while trying to figure what visuals or interactions were enhanced :) Eventually I read the API docs and read Enhancement is the PE that JQM provides and it seems you only need use data-enhanced if a parent turns enhancement off. But the demos do not make that clear as there is no parent turning it off. In fact the enhanced buttons appear to be doing something quite different - showing the text node in the parent div as a label with extra classes defined on the parent.

Indeed the enhanced version seems be what see in borwser F12 tools after JQM has done it's magic.

Can you point me to the docs about what exactly is going on or your point in included them is?

  • "Icon-only buttons are round by default" - I can't see any difference between the 2 icon only buttons
@jaspermdegroot
Copy link
Contributor

@SteveALee

The enhanced option has been introduced to improve performance. You can always use this option if you want. When you set the option to true the widget's JavaScript will skip adding classes and/or generating elements which makes things faster. Your markup have to be exactly the same as it would be if it were enhanced by the widget. See also http://api.jquerymobile.com/button/#option-enhanced

I hope this makes it clear.

That "icon-only button with custom border-radius" demo is indeed broken. The custom style is missing :(
I made a working demo for you in a JSBin: http://jsbin.com/kiyeze/edit?html,output

Fixing that demo will be part of ticket #8245 so I am going to close this ticket as duplicate. Thanks for reporting it!

@SteveALee
Copy link
Author

@jaspermdegroot OK, thanks

I got mixed up with data-enhance as documented on Data Attributes when looking at the source. Easily done as only one letter difference! :) Yes what you say makes sense and agrees with what I saw in the source

Thanks for the jsbin demo. Much appreaciated even though I kinda guessed what it looked from from the similar example on the Button markup page.

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

No branches or pull requests

2 participants