Skip to content

Instantly share code, notes, and snippets.

@negoro-writer
Created September 6, 2019 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save negoro-writer/961cc67bd1a1b71a9af40be53fa1fb46 to your computer and use it in GitHub Desktop.
Save negoro-writer/961cc67bd1a1b71a9af40be53fa1fb46 to your computer and use it in GitHub Desktop.
/*
Copyright (c) 2019 Ivan Grozdic(@IvanGrozdic)
Released under the MIT license
http://opensource.org/licenses/mit-license.php
*/
(function($) { "use strict";
$(".switch").on('click', function () {
if ($("body").hasClass("dark")) {
$("body").removeClass("dark");
$(".sp-menu-box").removeClass("dark");
$(".switch").removeClass("switched");
}
else {
$("body").addClass("dark");
$(".sp-menu-box").addClass("dark");
$(".switch").addClass("switched");
}
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment