How to select all values in drop down list by clicking a button using jQuery?
<p>If I use this </p>

<pre><code>$("select option").attr("selected", "true");
</code></pre>

<p><strong>Or</strong></p>

<pre><code>$(function(){
    $('select').children('option').attr('selected', 'selected');
});
</code></pre>

<p>the list of dropdown will be selected automatically.</p>

<p>But in my position I should not use Iterator. Here both function using iterator. Here each and every option we set true or selected through iterator. </p>

<p>I need like if I set true to object of list, all the value of list should be selected without using loop or iterator.</p>
