selectval = jQuery( selected ).attr("value") only getting first number
<p>why am i only getting getting 6356 into #id_OnPage? there are of course more LI.</p>

<p>I'm getting the rigth li, but only the first number..</p>

<pre><code>&lt;ol id="pageselect" class="ui-selectable"&gt;
        &lt;li value="6356,6145,6296,6211,6147,6149,6152,6155,6158,6160"&gt;page 1&lt;/li&gt;&lt;/ol&gt;

jQuery( ".ui-selected", this ).each(function(i, selected) {
  jQuery(this).siblings().removeClass("ui-selected");
  selectval = jQuery( this ).attr("value");
  jQuery('#id_OnPage').val(selectval);
});
</code></pre>

<p>thanks for any help</p>
