Easyui 1.4.2: Click to open the link topic there are more than 10
jquery Cookie: Click to open Link
first the page must first import Easyui Related:
Related interface, I defined a toggle theme for the
<div style= "POSITION:ABSOLUTE;RIGHT:14PX;TOP:42PX;" > <div class= "Easyui-panel" style= "padding:5px;font-size:20px;font-weight:900;" > <a href= "javascript:void (0);" class= "Easyui-menubutton" data-options= "menu: ' #layout_north_pfMenu ', icon Cls: ' Icon-ok ' "> Replace skin </a> </div> </div><div id=" Layout_north_pfmenu "style=" Displ Ay:none; " > <div onclick= "changetheme (' Default '); >default</div> <div onclick= "Changetheme (' black '); >black</div> <div onclick= "changetheme (' Bootstrap ');" >bootstrap</div> <div onclick= "Changetheme (' Gray '); >gray</div> <div onclick= "Changetheme (' metro '); >metro</div> <div onclick= "changetheme (' Metro-blue ');" >metro-blue</div> <div onclick= "changetheme (' Metro-gray ');" >metro-gray</div> <div onclick= "changetheme (' Metro-green ');" >metro-green</div> <div onclick= "Changetheme (' metro-red ');" >metro-red</div> <div onclick= "changetheme (' Metro-orange ');" >metro-orange</div> <div onclick= "changetheme (' Ui-cupertino ');" >ui-cupertino</div> <div onclick= "changetheme (' ui-dark-hive ');" >ui-dark-hive</div> <div onclick= "changetheme (' Ui-pepper-grinder ');" >ui-pepper-grinder</div> <div onclick= "changetheme (' Ui-sunny ');" >ui-sunny</div> </div>
JS in I wrote Changetheme this method:
/** * method of changing Easyui Theme * @param themename * Theme Name */changetheme = function (themename) {var $easyuiTheme = $ (' #easyuiTheme '); VA R url = $easyuiTheme. attr (' href '); var href = url.substring (0, Url.indexof (' themes ')) + ' themes/' + themename + '/easyui.cs s '; $easyuiTheme. attr (' href ', href), var $iframe = $ (' iframe '), if ($iframe. length > 0) {for (var i = 0; i < $iframe. l Ength; i++) {var IFR = $iframe [i];$ (IFR). Contents (). Find (' #easyuiTheme '). attr (' href ', href);}} $.cookie (' Easyuithemename ', ThemeName, {expires:7});};
MainThe principle of implementation is to change the import CSS file, so that you can switch themes
Easyui Switch Themes