Side navigation
#11726 closed bug (invalid)
Opened May 08, 2012 12:01PM UTC
Closed May 08, 2012 01:20PM UTC
Changing button's data-theme programatically
Reported by: | Radek | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I am changing data-theme for a button dynamically from JS.
Procedure
1. I have a button with theme "e"
2. I change it to "a" via
$btn.attr("data-theme", "e")
3. The button is still displayed in yellow, with the previous "e" theme
After that, I noticed the the generating <div> around the button contained both ui-btn-hover-e and ui-btn-up-e and their -a variants.
It is also in case when I'm updating data-theme for the div.
So the workaround for me is to also remove the previous classes from the generated div:
$btn.closest("div").attr("data-theme", "e").removeClass("ui-btn-hover-a").removeClass("ui-btn-up-a");
Attachments (0)
Change History (1)
Changed May 08, 2012 01:20PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
You'd want to file a bug in the jQuery Mobile issue tracker, per the big red box here that says "ARE YOU IN THE RIGHT PLACE?" http://bugs.jquery.com