Skip to content

Commit

Permalink
add closer
Browse files Browse the repository at this point in the history
  • Loading branch information
punkestu committed Oct 30, 2024
1 parent 0d4a02b commit 53a6699
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions resources/views/rotasi/pengajuan/input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,14 @@ function searchNIK() {
});
}
const body = document.querySelector('body');
body.addEventListener('click', function(e) {
if (!e.target.closest('#nik-suggestion') && !e.target.closest('#nik')) {
document.getElementById('nik-suggestion').classList.add('hidden');
document.getElementById('nik-suggestion').classList.remove('flex');
}
});
function debounce(func, timeout = 300){
let timer;
return (...args) => {
Expand Down
8 changes: 8 additions & 0 deletions resources/views/rotasi/pengajuan/update.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,14 @@ function searchNIK() {
});
}
const body = document.querySelector('body');
body.addEventListener('click', function(e) {
if (!e.target.closest('#nik-suggestion') && !e.target.closest('#nik')) {
document.getElementById('nik-suggestion').classList.add('hidden');
document.getElementById('nik-suggestion').classList.remove('flex');
}
});
function debounce(func, timeout = 300) {
let timer;
return (...args) => {
Expand Down

0 comments on commit 53a6699

Please sign in to comment.