Jquery find nearest matching element

后端 未结 4 1733
Happy的楠姐
Happy的楠姐 2020-12-28 11:16

I have a series of rows with columns and I want to select the value of an input field that is in a previous column to the input field (price input)

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-28 12:05

    closest() only looks for parents, I'm guessing what you really want is .find()

    $(this).closest('.row').children('.column').find('.inputQty').val();
    

提交回复
热议问题