dropdown menu does not disappear when an item is selected

2 replies · opened Mar 21, 2019

Jjd_in_sbMar 21, 2019

I am using the dropdown buttons in combination-filter-bt-dropdown.html

Unlike my header dropdown menu, which disappears then you select an item, the dropdown buttons in combination-filter-bt-dropdown.html don't disappear when clicked. They stay there forever until the user figures out that they need to click outside the dropdown menu to make it go away.

How do I make the dropdown menus in combination-filter-bt-dropdown.html disappear when an item is selected?

SSemicolon WebSTAFFMar 22, 2019

Hello,

This is Definitely Possible!

Simply find the following code on the HTML Page at the bottom:

$buttonGroup.toggleClass('open').find('.filter-text').html( $this.html() );

and add the following code just after the above line:

$this.parents('.btn-group').find('.dropdown-toggle').dropdown('hide');

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Jjd_in_sbMar 26, 2019

works great thanks!

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard