bootstrap-select nothing selected
<p>I am using bootstrap select.</p>

<pre><code>&lt;select name="categories[]" id="cat" class="selectpicker" multiple&gt;
&lt;/select&gt;
</code></pre>

<p>and getting the option tag from here,</p>

<pre><code>var result='';
for(var i=0;  i&lt;res.getcategories.length;  i++) 
{                    
  result += '&lt;option value='+res.getcategories[i].cat_id+'&gt;'+res.getcategories[i].category+'&lt;/option&gt;';                 
   $('#cat').html(result); 

}
</code></pre>

<p>However it always displays Nothing selected and i donot display other options. If i donot use bootstap class 'selectpicker' everything is fine.</p>