Jquery UI 主题切换器替代方案
我想在我的页面上使用 Jquery UI 主题切换器小部件。 问题是切换器是通过 http 托管的,而我的页面是 https 页面。 所以我遇到了包括切换器在内的安全错误。
有谁知道我是否可以获得切换器的源代码,以便我可以将其托管在我的网站上? 或者有我可以使用的第三方切换器脚本吗?
谢谢!
I want to use the Jquery UI Theme Switcher Widget on my page.
The problem is the Switcher is hosted via http and my page is a https page.
So I get security errors including the switcher.
Does anyone know if I can get the source of the switcher so I can host it on my site?
Or are there any third party switcher scripts that I could use?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
对于任何登陆这里的人。这是我发现的。
其中 10 个列表如下:(更新链接现已失效 - 2016 年 4 月)
http://www.net-kit.com/ 10-practical-jquery-style-switchers/可以在本地运行的 jquery 主题切换器的替代品在这里:
https://github.com/harborhoffer/Super-Theme-Switcher
For anyone that lands here. Here is what I found.
A list of 10 of them is here: (update link is dead now - Apr 2016)
http://www.net-kit.com/10-practical-jquery-style-switchers/A replacement for the jquery theme switcher that you can run locally is here:
https://github.com/harborhoffer/Super-Theme-Switcher
我不知道任何其他第三方实现,但自己也很容易实现。只需在
link
元素上设置一个 id,并在选择框更改时使用 jQuery 更改src
属性。将其抽象为插件也非常容易。I don't know about any other third party implementations, but it's easy to do yourself too. Just set an id on a
link
element and use jQuery to change thesrc
attribute when a select box changes. Abstracting it into a plugin is pretty easy as well.我不想听起来像是在推广我所做的项目,但我写了一个 jQuery-UI基于 themeswitchertool 的主题切换器,以创建一个真正像广告中那样工作的主题切换器。我的默认情况下不会链接到所有主题,但允许您添加任何您想要的主题。从 jQuery-UI 站点添加所有主题非常简单。
还有超级主题切换器,其他人似乎都在使用它,但事实并非如此和我的一样功能丰富,因为它是旧主题切换工具的端口。默认情况下,这个主题会链接所有 jQuery UI 主题。
I don't want to sound like I am promoting a project I did, but I wrote a jQuery-UI theme switcher based on the themeswitchertool, in order to create one that actually works as advertised. Mine does not link to all the themes by default, but enables you to add any theme you want. Adding all the themes from the jQuery-UI site is trivial.
There is also Super Theme Switcher, which everyone else seems to be using, but it is not as feature-rich as mine, due to it being a port of the old themeswitchertool. This one DOES link all the jQuery UI themes by default.
我有类似的错误,所以我从 http://jqueryui.com/themeroller/themeswitchertool/< 下载了js /a>,将其保存为 jquery.themeswitcher.js 并将所有 http jquery-ui url 替换为 google apis https url。
唯一的变化是在 var switcherpane 中,其中每个链接如下所示:
我将其替换为:
如果您搜索该文件,则会进一步向下引用一些其他 html 图像。
您可以在此处找到所有图片
I had similar errors so I downloaded the js from http://jqueryui.com/themeroller/themeswitchertool/, saved it as jquery.themeswitcher.js and replaced all http jquery-ui urls with google apis https urls.
The only changes were in the var switcherpane where each link looks like:
Which I replaced with:
If you search through the file there are a few other html images that are referenced further down.
You can find all the images here
您只需将 src 链接设置为“https”即可正常工作。
You can simply set the src links to "https" and it will work fine.