Created
March 25, 2014 12:21
-
-
Save pablolobos/9760779 to your computer and use it in GitHub Desktop.
js_focused-element.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var focusedElement = document.activeElement; | |
var triggerElement = document.activeElement; | |
myModal = new MyModal({ | |
onOpen: function() { | |
this.container.focus(); | |
}, | |
onClose: function() { | |
triggerElement.focus(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment