cssClasses += " " + selectElement.getClassName();
GQuery containerTemp =
$(ChozenTemplate.templates.container(containerId, cssClasses).asString()).width(fWidth);
final SafeStylesBuilder ssb = new SafeStylesBuilder();
if (isRTL) {
ssb.right(HORIZONTAL_OFFSET, Style.Unit.PX);
} else {
ssb.left(HORIZONTAL_OFFSET, Style.Unit.PX);
}
ssb.top(VERTICAL_OFFSET, Style.Unit.PX);
if (isMultiple) {
containerTemp.html(ChozenTemplate.templates.contentMultiple(css.chznChoices(),
css.searchField(), defaultText, css.defaultClass(), css.chznDrop(), css.chznResults(),
ssb.toSafeStyles())
.asString());
} else {
containerTemp.html(ChozenTemplate.templates.contentSingle(css.chznSingle(),
css.chznDefault(), defaultText, css.chznDrop(), css.chznSearch(), css.chznResults(),
ssb.toSafeStyles())
.asString());
}
// insert container after the select elements
$selectElement.hide().after(containerTemp);