web/_javascript/commons/mode-toggle.js

14 lines
331 B
JavaScript
Raw Normal View History

2022-10-25 14:26:44 +03:00
/**
* Listener for theme mode toggle
*/
2022-10-25 14:26:44 +03:00
$(function () {
$(".mode-toggle").click((e) => {
const $target = $(e.target);
let $btn = ($target.prop("tagName") === "button".toUpperCase() ?
$target : $target.parent());
2022-10-25 14:26:44 +03:00
$btn.blur(); // remove the clicking outline
flipMode();
});
});