动态切换 JQuery 主题?
如果我下载多个 JQuery 主题,如何让 Web 应用程序的用户能够在主题之间动态切换?
If I download multiple JQuery themes how can I give the users of my web application the ability to dynamically switch between themes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Nick Craver 的评论是正确的,主题切换器小部件非常理想:
http://jqueryui.com/docs/Theming/ThemeSwitcher新链接: https://github.com/harborhoffer/Super-Theme-Switcher
Nick Craver's comment was correct, the themeswitcher widget was ideal:
http://jqueryui.com/docs/Theming/ThemeSwitchernew link: https://github.com/harborhoffer/Super-Theme-Switcher
除了主题切换器之外,您还可以通过删除当前主题的链接来动态更改主题。添加新主题的新链接。
这样做的好处是您还可以更改自己的主题。
请参阅下面的 Ansatz
现在考虑在单击按钮时更改主题:
您需要确保底层(外部)javascript 适用于相同版本。
Apart from the themeswitcher, you can do change the theme dynamically by removing the links to the current theme. Add new links with the new theme.
This enjoys the advantage that you can change also your own themes.
See below for an Ansatz
Now consider to change the theme upon a button clicked :
You need to ensure that the underlying (external) javascript is for the same version.