jquery value of input field within class -



jquery value of input field within class -

i have several div's class .agrrow. in each .agrrow there input field name agrprice.

i want value of field each instance of .agrrow. i've tried like:

$(".agrrow").each(function(){ // cost field lp=parsefloat( $("input[type='text'][name='agrprice']").val() ); });

but ever gives me value of agrprice in first instance of .agrrow class.

i'm sure need incorporate "this" i'm not sure how.

what right syntax?

you should find input element in current teration context. can use:

$(".agrrow").each(function(){ // cost field lp=parsefloat($(this).find('[name=agrprice]').val()); });

to them in array:

$(".agrrow [name=agrprice]").map(function(){ homecoming parsefloat($(this).find('[name=agrprice]').val()); }).get()

jquery

Comments

Popular posts from this blog

php - How to pass multiple values from url -

php - Laravel not returning controller -

c# - Confused on how to specify a Platform and Version while using ChromeOptions for RemoteWebDriver with Selenium donNet since recent updates -