harvesthq/chosen — Issue #493: Updating data-placeholder message when listz-updated
Author: Abstremik
Created: 2012-02-10 19:02:56+00:00
State: open

Hello,

I have been using the chosen plugin with some success, however I have stumbled on a problem.

I have been trying to find a way to use this plugin in the following way:

1. A chosen select is created with no options with data-placeholder set to "Empty"
```

```
2. An event is triggered that retrieves data and builds the options to be selected resets data-placeholder and triggers listz-update
```
function showOptions(res){
$('#choose').find('option').remove();
$("#choose").append($('
'));
var obj = JSON.parse(res);
for (i=0;i
').val(obj[i]).html(obj[i]) );
}
$("#choose").attr("data-placeholder","Something");
$("#choose").trigger("liszt:updated");
}
```