So, I am trying to apply the Chosen jQuery plugin in the select box after loading it through XAJAX . Here is the code:
Usually I start loading on the page, and all the selection fields with the class are correctly formatted accordingly:
$(document).ready( function () {
$(".chzn-select").chosen();
});
Then I have a function that uses XAJAX to display a new selection window in the specified DIV on the page. It works great. HOWEVER, he was not chosen by the Chosen One, as it should be.
I also tried to add a delay because I read on some forums that this worked for some people. This does not work....
function getNewSelect(property_id){
xajax_getNewSelect();
$(".chzn-select-ajax").delay(5).chosen();
}
Does anyone have any ideas?
source
share