Okay...this is what I have:
$('#more_rows').click(function(){
var allvars = [];
var threevar = $('#third_select option:selected').text();
allvars.push(threevar);
});
This gets the text of the currently selected option for a select box. What I thought it would do is push that text into the newly created allvars array. It pushes the text in the first time the click function happens and I get this:
["Example Text 1"]
However, when a new option is chosen from the select and the click function happens again, I get this:
["Example Text 2"]
What I want is:
["Example Text 1","Example Text 2"]
And to be able to add as many items as needed to this array.
What mistake am I making here and is there a better way to do this?