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

How can I catch keydown event? #51

Open
loretrisolini opened this issue Aug 24, 2016 · 0 comments
Open

How can I catch keydown event? #51

loretrisolini opened this issue Aug 24, 2016 · 0 comments

Comments

@loretrisolini
Copy link

How can I catch keydown event, like .on("keydown", function(){})? I can catch events like select2-open, select-close but I can't catch events like keydown.
The code below works only for close event but It does not work for keydown event.

"<select2 ng-model="fmData.data.value" s2-options="option.value as option.label for option in options"
options="optionsSelect"` id="{{item.id}}-{{fmData.name}}" style="width:100%"></select2>"

            jQuery('#'+ id)
              .on("select2-close",  function(e) {
                console.log("here");
              })
             .on("keydown", function (e) {
               console.log("keydown");
             });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant