Get the first element that is checked after page reload
<p>I have a check-list, and I want to get the first item that a user checked regardless of its position on the list. I know I can get the first item on the list with <code>:first</code>, which is not the case here.</p>

<p>UPDATE:
Sorry I did'nt make my self clear. The reason is to get first checked value and store it separately in cookie. Then, get the second checked option and store it as the first one; (here the second option can be selected after page reload).This is my code so far:</p>

<pre><code>$('input[type="checkbox"]').live('click', function() {
var selected = '';
var values = [];

$('input[type="checkbox"]').each(function(index, value) {
    if (this.checked) {
        selected += "&lt;span&gt;" + $(this).next().html() + " &lt;/span&gt; ";
        values.push($(this).next().html());
    }

      if($('input[type="checkbox"]:checked').length &gt; 1 ) { 
         $('input[type="checkbox"]').each(function(index, value) {
            if (!this.checked) {
               $(this).attr("disabled", true);
            }
        });
      } else {

            $('input[type="checkbox"]').attr("disabled", false);
      } 
});
//Here is the code I have below:
 //store values and return them
    str1 = values[0];
    number1 = str1.replace(/\D/g,"");
    $.cookie('val1', number1, {expires: 7});

    str2 = values[1];
    number2 = str2.replace(/\D/g,"");
    $.cookie('val2', number2, {expires: 7});
</code></pre>

<p>This does store both values, but they get reset after page reload.
any help?</p>
