The jQuery Mobile framework uses the CSS class activeBtnClass
to style a button in an active state with theme b
by default. The activeBtnClass
class has a default string value ui-btn-active
. To style the active page (the page in view or in transition), the framework uses the CSS class activePageClass
, which has a default string value ui
-page-active
. This recipe shows you how to configure the framework to use custom classes instead of these default classes.
Copy the full code of this recipe from the code/07/active-class
sources folder. You can launch this code using the URL: http://localhost:8080/07/active-class/main.html
.
In
main.html
, add the following style to the<head>
tag of the page to define your own custom active button class and active page class:<link rel="stylesheet" href="http://code.jquery.com/mobile /1.1.1/jquery.mobile-1.1.1.min.css" /> <style> .ui-custom-btn-active { background: #53C584...