2 lines
1.2 KiB
JavaScript
Executable File
2 lines
1.2 KiB
JavaScript
Executable File
!function(t){"use strict";t("#color-switcher-button").on("click",function(){return t("#color-switcher-content").stop().toggle(200),!1}),t("#color-switcher-content").on("click",".js__change_color",function(o){return o.preventDefault(),t(this).hasClass("active")||(t("#color-switcher-content .active").removeClass("active"),t("#custom-color-themes").length&&t("#custom-color-themes").remove(),"blue"!=t(this).data("color")&&t("body").append('<link id="custom-color-themes" rel="stylesheet" href="assets/styles/color/'+t(this).data("color")+'.min.css">'),t(this).addClass("active")),!1}),t("#color-reset").on("click",function(){var o=t('#color-switcher-content .js__change_color[data-color="blue"]');t("#custom-color-themes").length&&t("#custom-color-themes").remove(),"blue"!=o.data("color")&&t("body").append('<link id="custom-color-themes" rel="stylesheet" href="assets/styles/color/'+o.data("color")+'.min.css">'),t("#color-switcher-content .js__change_color").removeClass("active"),o.addClass("active")}),t("#wrapper").on("click",function(o){"color-switcher"==t(o.target).attr("id")||t(o.target).parents("#color-switcher").length||t("#color-switcher-content").stop().hide(200)})}(jQuery);
|