How to change theme dynamically in jquery mobile?
问题 I am creating a mobile web applications using jQuery Mobile. I am using theme-b for every page and I would like to change to another theme dynamically for every page. How can I change the theme dynamically? 回答1: You can target specific classes that relate to specific widgets, reset their classes, and then add the themed class of your choosing: //set your new theme letter var theme = 'e'; //reset all the buttons widgets $.mobile.activePage.find('.ui-btn') .removeClass('ui-btn-up-a ui-btn-up-b