I’m attempting to find the value of all elements with the class bm-user-label, and put it into a javascript array. However when I do this I only get the first two characters of the value field. For instance for:
value="30bb3825e8f631cc6075c0f87bb4978c"
I get returned
30
The DOM looks like
<li value="30bb3825e8f631cc6075c0f87bb4978c" class="cboxElement bm-user-label">first</li>
And my javascript is:
var com_labels = $('.bm-user-label').map(function() {
return(this.value);
}).get();
Any ideas?
<li>elements are not defined to have a value. You should get this attribute usingthis.getAttribute("value")instead.