I have an onclick event that calls a function by passing the current div:
<div onclick="deleteline($(this));">
In my delete function, how do I get the child of the parent element of $ (this), where the name contains Qty?
In this example, I want to get the ProdQty input field:
<div>
<input id="PrdQty" type="hidden" value="1">
<div onclick="deleteline($(this));">
</div>
EDIT: This page becomes embedded several times in another page with an ajax call. Therefore, if I assign a clickable div ID, it will cause a conflict after this code is entered into the parent file a second time.
As a result, I used the sentences below, saved inline onclick and get qty with: sender.parent (). find ('input [id * = "Qty"]')
source
share