Use temp variable for .chosen().next()
This commit is contained in:
parent
02c6f0f631
commit
3e0ef018ab
|
@ -44,9 +44,10 @@ Discourse.ComboboxView = Discourse.View.extend({
|
||||||
$elem.chosen({ template: this.template, disable_search_threshold: 5 });
|
$elem.chosen({ template: this.template, disable_search_threshold: 5 });
|
||||||
if (this.overrideWidths) {
|
if (this.overrideWidths) {
|
||||||
// The Chosen plugin hard-codes the widths in style attrs. :<
|
// The Chosen plugin hard-codes the widths in style attrs. :<
|
||||||
$elem.chosen().next().removeAttr("style");
|
var $chznContainer = $elem.chosen().next();
|
||||||
$elem.chosen().next().find('.chzn-drop').removeAttr("style");
|
$chznContainer.removeAttr("style");
|
||||||
$elem.chosen().next().find('.chzn-search input').removeAttr("style");
|
$chznContainer.find('.chzn-drop').removeAttr("style");
|
||||||
|
$chznContainer.find('.chzn-search input').removeAttr("style");
|
||||||
}
|
}
|
||||||
if (this.classNames && this.classNames.length > 0) {
|
if (this.classNames && this.classNames.length > 0) {
|
||||||
// Apply the classes to Chosen's dropdown div too:
|
// Apply the classes to Chosen's dropdown div too:
|
||||||
|
|
Loading…
Reference in New Issue