Closed emilkarolak closed 10 years ago
It's interfering with Bootstrap using toggleClass('open')
, so you need to use stopPropagation. Then, use click instead of addClass to initiate setSize():
$('label[for="' + id + '"]').click(function(e) {
e.preventDefault();
e.stopPropagation();
that.$button.click();
});
See it in action: http://jsfiddle.net/caseyjhol/VrQ6P/1/
I'm trying to expand bootstrap select with related label by adding class 'open' to it's container.
I put it in label click event in bootstrap-select.js - line 64 like this:
that.$newElement.toggleClass('open');
because I want select to expand instead of just focus.
I can toggle ANY class BUT 'open' - i can do 'openx' or so but not 'open' - no console error or anything - nothing happens.
Fiddle: http://jsfiddle.net/VrQ6P/ - line 64 in JavaScript window.
Please help.