I am rewriting a jquery function and I would like to know how to write the jquery focusout function in vanilla?
var inputBox = $('.searchbox-input');
// ...
inputBox.focusout();
I am rewriting a jquery function and I would like to know how to write the jquery focusout function in vanilla?
var inputBox = $('.searchbox-input');
// ...
inputBox.focusout();
2
Answers
You can use
dispatchEvent
as a (near) equivalent to jQuery’strigger
.