Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open modal video with keypress #58

Open
ghost opened this issue Oct 12, 2020 · 1 comment
Open

Open modal video with keypress #58

ghost opened this issue Oct 12, 2020 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Oct 12, 2020

Is it possible to open the modal video with keypress when it is in focus? I'm trying:

 $(e.currentTarget).on("keypress", function (e) {
      if (e.which === 13) {
        console.log("here");
        $(this).trigger("click");
      }
    });

The console logs correctly but the modal does not open. Any ideas? Thanks in advance.

@uidev1116
Copy link

uidev1116 commented Jan 13, 2023

@ghost
How about using a button tag?

<button type="button" class="js-modal-btn">Open Video</button>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant