So I made a site and I add an addEventListener on click but the site has 2 buttons and Id like it to work on only 1.

// Installing handler on click
document.querySelector(‘.my-open-trigger’).addEventListener(‘click’, evt => {
evt.preventDefault()
// Open authorization
sa.open()
}, false)
Id like the auth window to open only when the right button is clicked. If not the normal action from the HTTML code should be executed(opening a new window).

bir3yk Default Asked on February 25, 2019 in Programming.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.