Skip to content

Instantly share code, notes, and snippets.

@zanesensenig
Created November 9, 2015 15:06
Show Gist options
  • Save zanesensenig/e32534daef754b75d4fe to your computer and use it in GitHub Desktop.
Save zanesensenig/e32534daef754b75d4fe to your computer and use it in GitHub Desktop.
Autofocus an input field inside of a Foundation modal window.
$(document).on('opened.fndtn.reveal', '[data-reveal]', function () {
var modal = $(this);
modal.find('[autofocus]').focus();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment