If chosen is loaded, trigger update of contents.

This commit is contained in:
Nathan Gray 2012-12-31 20:22:59 +00:00
parent d496ba3cd5
commit 841d3b67bd

View File

@ -124,6 +124,11 @@ function selectbox_add_option(id,label,value,do_onchange)
selectBox.options[selectBox.length] = new Option(label,value,false,true);
}
if (selectBox.onchange && do_onchange) selectBox.onchange();
// If chosen is loaded, trigger update
if(selectBox && $j().chosen) {
$j(selectBox).trigger("liszt:updated");
}
}
/* toggles all checkboxes named name in form form, to be used as custom javascript in onclick of a button/image */