How do I show the selected value of select2?
<p>I am trying to set the value dynamically to my combobox on which I have applied select2 jQuery class. After applying code it sets the value to that combobox; but it still says "Select one". 
Can anyone help me to show the selected value? Please.</p>

<p><strong>HTML</strong>:</p>

<pre><code>&lt;select id="cmboDemo"&gt;
 &lt;option value=""&gt;Select one&lt;/option&gt;
 &lt;option value="Bob"&gt;Bob&lt;/option&gt;
 &lt;option value="Scott"&gt;Scott&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p><strong>Javascript</strong>:</p>

<pre><code>$("#cmboDemo").select2();
//....
$("#cmboDemo").val("Scott");
...//    
</code></pre>

<p>In result <strong>scott</strong> is selected but combobox shows "<strong>Select one</strong>".</p>