So I have a drop down list like this:
<select name="store-cost" class="target">
<option value = '100'>100</option>
<option value = '500'>500</option>
<option value = '1500'>1500</option>
</select>
and jquery to see what the user has chosen
$( ".target" ).change(function() {
console.log($( this ).val());
});
and i have a button that calls jquery function:
<a href="#" onclick = donateNow(100)>Donate</a>
How do I change the value in the function donateNow according to the user's option?
Many thanks
EDIT, sorry didn't make myself clear, I would like to change I would like to change the function donateNow() param according to the user's chosen option