I’m developing a website for mobile. I’m trying to make the website look like ordinary iPhone app, so I want to use jQuery Mobile’s nav UI at the bottom. But I meet the problem when I get to add/remove its color binding to click action. I added JavaScript as below
function collect () {
if ($("#collect").hasClass("ui-btn-active")) {
$("#collect").removeClass("ui-btn-active");
removeCollect();
} else {
addCollect();
}
}
The JavaScript doesn’t work. So, I wonder if I should rewrite some function or take another way to realize it.
I would just create a custom theme. I think what you have above is fine. Does the element that contains these buttons have a theme? If you are using the default one I would expect to see the default theme. I’m not sure if that answers your question. We may need some more detail on this.
From what I read above it seems you are unhappy with the active state of the button.