1

I am trying to manually toggle a bootstrap dropdown. This script used to work until recently:

$(function () {
    $('.role-toggler').on('click', function (e) {
        $(this).find('.dropdown-toggle').dropdown('toggle');
        e.stopPropagation();
    });
});

However when I try click the dropdown now I get:

Uncaught Error: Method toggle does not exists on jQuery.dropdown

I am using Material Design for Bootstrap, Bootstrap 3.3.6 and jQuery 2.1.4. I recently updated my packages which included bootstrap and jquery, which may have caused this issue.

T J
  • 42,762
  • 13
  • 83
  • 138
barnacle.m
  • 2,070
  • 3
  • 38
  • 82

1 Answers1

1

The issue is probably that Bootstrap material design is now using a custom jQuery dropdown plugin which overwrites the bootstrap drowpdown but has a different minimal API.

Try raising an issue mentioning that you expect a bootstrap like API since its a bootstrap theme.

T J
  • 42,762
  • 13
  • 83
  • 138