Closed
Description
I am trying to disable hover dropdown on mobile at 768 when the browser window is sized down and scaled up, but I am having problems "stopping" the plugin. I am really new to JS and am surprised I got this far! But with another plugin something like this was built in, I am wondering if I missed something?
This is what I have so far.
//dropdown navbar collapse fix
$(function () {
var $window = $(window),
$toggle = $('.dropdown-toggle');
function onResize() {
if ($window.width() > 768) {
$toggle.dropdownHover();
} else {
//disable here
}
}
$window.resize(onResize);
// call once on start up
onResize();
});
If there is a simple way to do this and I am overlooking it?
Metadata
Metadata
Assignees
Labels
No labels