<p>Given a select with multiple option's in jQuery. </p>

<pre><code>$select = $("&lt;select&gt;&lt;/select&gt;");
$select.append("&lt;option&gt;Jason&lt;/option&gt;") //Key = 1
       .append("&lt;option&gt;John&lt;/option&gt;") //Key = 32
       .append("&lt;option&gt;Paul&lt;/option&gt;") //Key = 423
</code></pre>

<p>How should the key be stored and retrieved?</p>

<p>The ID may be an OK place but would not be guaranteed unique if I had multiple select's sharing values (and other scenarios).</p>

<p>Thanks</p>

<p>and in the spirit of TMTOWTDI.</p>

<pre><code>$option = $("&lt;option&gt;&lt;/option&gt;");
$select = $("&lt;select&gt;&lt;/select&gt;");
$select.addOption = function(value,text){
    $(this).append($("&lt;option/&gt;").val(value).text(text));
};

$select.append($option.val(1).text("Jason").clone())
       .append("&lt;option value=32&gt;John&lt;/option&gt;")
       .append($("&lt;option/&gt;").val(423).text("Paul"))
       .addOption("321","Lenny");
</code></pre>

The HTML
```
<option>
```
tag has an attribute called "value", where you can store your key.
e.g.:
```
```
<option value=1>Jason</option>
```
```
I don't know how this will play with jQuery (I don't use it), but I hope this is helpful nonetheless.