I have ul like this:
<ul class="options" id="selt_count">
<li value="1">One</li>
<li value="2">Two</li>
<li value="5">Five</li>
<li value="12">Other</li>
</ul>
<input type="submit" id="send1" value="send">
i used this script to get all values of li into variable in the following format (1,2,5,12) in jquery:
<script>
$(document).ready(function(){
$("#send1").click(function(){
var values = $('#selt_count li').map(function() {
return this.value
});
values;
var s = '(' + values.get().join(',') + ')';
alert (s);
});
});
</script>
But this script is not working if the values of li are given as character
Example: Now i have a ul:
<ul class="options" id="selt_count">
<li value="jonh">One</li>
<li value="jack">Two</li>
<li value="black">Five</li>
<li value="barbosa">Other</li>
</ul>
the script will display (0,0,0,0)
Can anyone please help me and tell me what is the error? thank you in advance.