I have a series of rows with columns, and I want to select the value of the input field, which is in the previous column, in the input field (price input), which I call the function on when the key is.
I tried:
quantity = $(this).parent().parent().children().val() ; quantity = $(this).parent().parent().children().closest('.inputQty', this).val() ;
But does not work.
DOM example:
<div class="row"> <div class="column"><input class="inputQty" id="quantity0" /></div> <div class="column"><input class="someOther" id="Other0" /></div> <div class="column"> <div class="cSelect"> <select id="currency0"><option>£</option></select> <input class="price" id="price0" /> </div> </div> </div>
jquery dom-traversal
imperium2335 Aug 01 2018-12-12T00: 00Z
source share