-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document.querySelectorAll doesn't seem to work #17
Comments
var _hoverTriggers = document.querySelectorAll('.JS-navigator__trigger--hover');
Array.prototype.forEach.call(_hoverTriggers, function(el) {
hoverintent(el, hoverInFunc, hoverOutFunc);
}); |
It might be a good idea to support |
Yuk! XP This issue drove me back to the jQuery version of the plugin. You need to support node list if you want to be able to compete with it. |
1+ On this. Would def make a difference 👍 |
For what it's worth, it's not that hard to make hoverIntent work with const toggles = document.querySelectorAll('[data-dropdown-open]');
if (!toggles) return;
for (const toggle of toggles) {
hoverIntent(
toggle,
() => {
toggle.setAttribute('data-dropdown-open', 'true');
},
() => {
toggle.setAttribute('data-dropdown-open', 'false');
}
);
} |
I have this code
And I am receiving this error:
The most common use for this plugin is triggering mega menus on navigation items. It doesn't make sense not supporting query selector all in this context.
The text was updated successfully, but these errors were encountered: