Is there a way to dynamically ajax add elements through jquery chosen plugin?

后端 未结 8 1620
南旧
南旧 2020-12-15 06:50

I am trying to use \"Chosen\" plugin by harvest (http://harvesthq.github.com/chosen/) and it works for the static set of options I am passing. However, what I want is that w

8条回答
  •  生来不讨喜
    2020-12-15 07:17

    i think its not the best practice but this code works for me. data return has a html tag

    $.post("url.php",{data:data},function(data){
    $('.choosen').empty().append(data);
    $(".choosen").trigger("liszt:updated");
    });
    

提交回复
热议问题