2011-12-20 50 views
5

我想在我的頁面上使用Jquery UI Theme Switcher Widget。 問題是切換器通過http託管,我的頁面是https頁面。 所以我得到包括切換器在內的安全錯誤。Jquery UI Theme Switcher Alternatives

有誰知道我是否可以得到切換臺的源,以便我可以在我的網站上託管它? 或者是否有我可以使用的任何第三方切換器腳本?

謝謝!

回答

15

對於任何人登陸這裏。這是我發現的。

的其中10個名單是在這裏:(更新鏈接已經死了,現在日 - 4月2016) http://www.net-kit.com/10-practical-jquery-style-switchers/

一個替代jQuery的主題切換,你可以在本地運行是在這裏: https://github.com/harborhoffer/Super-Theme-Switcher

+1

10個不再指向風格切換器的列表。 – Kolban 2014-12-08 16:33:40

+0

極其簡單的使用谷歌託管庫[** here **]的切換器(https://github.com/JDMcKinstry/jQuery-UI-Theme-Switcher) – SpYk3HH 2016-06-27 20:08:22

4

我不知道任何其他第三方的實現,但它也很容易做到。只需在link元素上設置一個ID,並在選擇框更改時使用jQuery更改src屬性。將它抽象成插件也很容易。

2

我有類似的錯誤,所以我從http://jqueryui.com/themeroller/themeswitchertool/下載了js,將它保存爲jquery.themeswitcher.js,並用google apis https urls代替了所有http jquery-ui url。

唯一的變化是在var switcherpane其中每個環節的樣子:

<li><a href= 
"http://jqueryui.com/themeroller/css/parseTheme.css.php?...."> 
<img src= 
"http://jqueryui.com/themeroller/images/themeGallery/theme_90_ui_dark.png" alt= 
"UI Darkness" title="UI Darkness" /> <span class="themeName">UI 
darkness</span></a></li> 

我與替換:

<li><a href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/ui-lightness/jquery-ui.css"> 
<img src="content/images/theme_90_ui_light.png" alt="UI Lightness" title= 
"UI Lightness" /><span class="themeName">UI lightness</span></a></li> 

如果整個文件中搜索也有一些其他的HTML圖像那些被進一步引用。

你可以找到here

1

你可以簡單地設置src鏈接爲「https」,它會正常工作的所有圖像。

<link rel="stylesheet" href="themes/MyTheme.min.css" /> 
<link rel="stylesheet" href="themes/jquery.mobile.icons.min.css" /> 
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.1/jquery.mobile.structure-1.4.1.min.css" />  
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>  
<script src="https://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script> 
2

我不想聽起來像我推動的項目,我做了,但是我寫了一個jQuery-UI theme switcher based on the themeswitchertool,以創建一個真正像宣傳的那樣。 Mine並沒有默認鏈接到所有主題,但可以添加任何你想要的主題。從jQuery-UI網站添加所有主題是微不足道的。

還有其他人似乎正在使用的Super Theme Switcher,但它不像我的功能豐富,因爲它是舊主題開關的端口。這個鏈接默認鏈接所有jQuery UI主題。