Last active
June 25, 2019 11:23
-
-
Save diewland/028a4b8a54f7b0c04c38b90fc634872d to your computer and use it in GitHub Desktop.
Find onblur next target
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
/* https://stackoverflow.com/a/11544685/466693 */ | |
// focus on first element | |
$('.my-text').eq(0).focus(); | |
// onblur event | |
$('.my-text').blur(function (event) { | |
// do onblur stuff | |
// ... | |
// find next target | |
setTimeout(function(){ | |
console.log('next target is', document.activeElement); | |
}, 1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment