Jquery multiselect disable options based on condition
<p>Using Jquery multiselect for dropdown. Am filling multiselect with some values and selecting data which user already selected(coming from DB), can i disable some options based on condition.
Here is my code</p>

<pre><code>$.each(selectedGroups, function(){
    $("#usergroup_list").multiselect('select',this.id);
    if(this.name =="Viewer"){
     $('#usergroup_list option[value=\"'+this.id+'\"]').prop('disabled', true);
    }
});
</code></pre>

<p>But this is not working</p>