Search code examples
jqueryjquery-ui-multiselect

Jquery multiselect values not UTF-8


Im using Jquery multiselect for a project.The issue i am having is that special char is not rendered well when choosen. For instance in my picklist i have the value "Anadarko E&P", when i select this value, it is displayed as "Anadarko E&P". enter image description here

Do anybody know how to prevent this? Thanks in anticipation


Solution

  • I got it to work.Find the code below :

              $j(selector).multiselect({
            header: true,
            multiple: false,        
            selectedList: 1,
            classes: "jq_over",
            selectedText: function(numChecked, numTotal, checkedItems){
              for(var i = 0; i < checkedItems.length; i++){
                return $j(checkedItems[i]).siblings().text();
              }
           }
        }).multiselectfilter();
    

    I had to modify the selectedText attibute to take the label and this works correctly