harvesthq/chosen — Issue #501: max_width option
Author: gregxross
Created: 2012-02-22 00:01:50+00:00
State: open

I needed to be able to specify the maximum width of the box. I updated the code in set_up_html and I've included it here in case it's useful:

var w = this.f_width;

if (this.options && this.options.max_width)
w = this.options.max_width;

container_div = $("

", {
id: this.container_id,
"class": "chzn-container" + (this.is_rtl ? ' chzn-rtl' : ''),
style: 'width: ' + w + 'px;'
});