Get select selected value
<p>I have a url like this:
<code>index.php/home/lista_modelo_ajax?id="+$('#colecoes').val(),</code></p>

<p>The thing is that the: <code>$('#colecoes').val()</code> is always the first item of the select, not the one I choose.</p>

<p>Any ideas?</p>

<p>Thanks in advance.</p>

<p><strong>EDIT</strong></p>

<pre><code>&lt;script&gt;
    $(function() {
            $( "#modelos" ).autocomplete({
                source: "&lt;?php echo base_url();?&gt;index.php/home/lista_modelo_ajax?id="+$('#colecoes').val(),
                minLength: 2
            });
    });
    &lt;/script&gt;


&lt;label for="colecoes"&gt;Coleções&lt;/label&gt;
        &lt;select name="colecoes" id="colecoes"&gt;
            &lt;option value="16"&gt;-&lt;/option&gt;
            &lt;?php foreach($lista_colecao as $colecao){?&gt;
            &lt;option value="&lt;?php echo $colecao-&gt;idColecao;?&gt;"&gt;&lt;?php echo $colecao-&gt;nomeColecao;?&gt;&lt;/option&gt;
            &lt;?php }?&gt;
        &lt;/select&gt;
        &lt;label for="modelos"&gt;Modelo&lt;/label&gt;
        &lt;input type="text" name="modelos" id="modelos" /&gt;
</code></pre>

<p>All php is working fine, generating the IDs on the value of options objects, the problem is only with JS</p>
