DropDownlist getting value by id
<p>i try to retrieve value of dropdownlist value but it prints undefined why ? </p>

<pre><code>var selected =  $("#checkedSelect option:selected").val();
</code></pre>

<p>i take like that </p>

<pre><code>{foreach from=$allTypes value=types}
                        &lt;option id="checkedSelect" value="{$types.id}"&gt;{$types.type}&lt;/option&gt;
                           {/foreach}
</code></pre>
