Skip to content

Commit

Permalink
changed event x, y coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisClaude committed Dec 17, 2021
1 parent f682234 commit 95d32b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions button-ripple-effect/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const buttons = document.querySelectorAll('.ripple')

buttons.forEach(button => {
button.addEventListener('click', function (e) {
const x = e.clientX
const y = e.clientY
const x = e.pageX
const y = e.pageY

const buttonTop = e.target.offsetTop
const buttonLeft = e.target.offsetLeft
Expand Down

2 comments on commit 95d32b5

@Yevgenii1
Copy link

@Yevgenii1 Yevgenii1 commented on 95d32b5 Feb 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yevgenii1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.