简体   繁体   中英

how do you make a Theme switcher using Jquery and JavaScript?

我想使用jQuery来简化主题,我看到了jQuery 移动页面文档中的示例,但是它是详尽无遗的,因为它复制了同一页面,但是主题色样不同,因此它仅影响App中的一个页面,我想要一个影响应用程序所有页面的主题切换器,谢谢。

也许存储选定的主题(本地存储/ cookie)并使用jQuery来获取该值并将样式元素添加到页面?

Consider using jQuery UI and their themeswitcher - http://jqueryui.com/docs/Theming/ThemeSwitcher

It works great on our internal site. If nothing else, look at the way they do it and you should be able to come up with your own customer solution rather easily.

使用会话变量来确定要包括的CSS。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM