简体   繁体   English

如何使用Jquery和JavaScript制作主题切换器?

[英]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 考虑使用jQuery UI及其themeswitcher : //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。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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