Skip to content

Commit

Permalink
use focusout event for percentile input
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbrjt committed Feb 12, 2025
1 parent 551f897 commit 84520ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@
// calculate rank
;(function find_rank() {
const btn = document.getElementById('btn-4')
const percentile_inp = document.getElementById('percentile')

btn.addEventListener('click', () => {
const percentile_inp = document.getElementById('percentile')
percentile_inp.addEventListener('focusout', () => {
const rank_inp = document.getElementById('rank')
const percentile = Number(percentile_inp.value)

Expand Down

0 comments on commit 84520ce

Please sign in to comment.