Skip to content

Destroy function? #73

@dsamardjiev

Description

@dsamardjiev

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions