refactor: replace the deprecated js api
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
* Listener for theme mode toggle
|
||||
*/
|
||||
$(function () {
|
||||
$(".mode-toggle").click((e) => {
|
||||
$(".mode-toggle").on('click',(e) => {
|
||||
const $target = $(e.target);
|
||||
let $btn = ($target.prop("tagName") === "button".toUpperCase() ?
|
||||
$target : $target.parent());
|
||||
|
||||
$btn.blur(); // remove the clicking outline
|
||||
$btn.trigger('blur'); // remove the clicking outline
|
||||
flipMode();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user