Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var createFocusTrap = require('../../');
var containerOne = document.getElementById('demo-one');
var focusTrapOne = createFocusTrap('#demo-one', {
onDeactivate: function () {
containerOne.className = 'trap';
document.getElementById('activate-one').addEventListener('click', function () {
containerOne.className = 'trap is-active';
document.getElementById('deactivate-one').addEventListener('click', function () {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.