I have the following in a form
<input type="text" class="attr_values[]" value="1" />
<input type="text" class="attr_values[]" value="2" />
And I am trying to pass all the values in the "attr_values" array so it can be posted via Ajax but the following doesn't work.
$.ajax({
url: 'index.php',
type: 'POST',
data:{
attr_values: $('.attr_values').val()
How can this be done?