[ACCEPTED]-Read multiple jQuery.val() into array-iteration
Accepted answer
Found a solution thanks to Dogbert. All 2 that was missing in his example was the 1 .get()
Here is the solution i ended up using:
var info = $('[id^="info_"]').map(function () { return $(this).val(); }).get();
You can use jQuery.map
var info = $('[id^="info_"]').map(function() { return $(this).val(); } )
0
$('[id^="info_"]').each(function(){ info.push($(this).val()); });
should do
0
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.