It looks like if you deselect an item from the "selected" list, then you can't change your mind and select it again. It is clear also in the "form" example provided by the website:
http://jsfiddle.net/awnry/QzjTs/
if you deselect the items 2 or 4, and then you select them again, they move correctly from the left to the right, but their "selected" attribute doesn't change, and indeed they are not listed in the "form content" box.
( You can also verify the count of selected items with:
function updateConsole()
{
$("#console").text($("#form option:selected").length);
}
)
Does anyone know how to solve this issue?
Thanks
EDIT: looks like it works fine with Chrome, while it doesn't work with FF or MSIE. Maybe it needs a fix...?
The code works well in jQuery 1.8.
Demo: http://jsfiddle.net/QzjTs/57/
The reason why is that in order to work well in jQuery 1.9 + the plugin must be updated in
.removeAttr("selected")
to.removeProp("selected")
; and.attr("selected", "selected");
to.prop("selected", "selected");
Update guide: http://jquery.com/upgrade-guide/1.9/
Issue here: https://code.google.com/p/jquery-ui-picklist/issues/detail?id=16