...This has been asked a bunch of times, but I still cannot solve my problem.
I have a list of elements, created dynamically, defined by class 'box', as follows:
<div class="box">
<button onclick="buttonFunction(element.inputBox)"></button>
<input class="inputBox"></input>
</div>
<div class="box">
<button onclick="buttonFunction(element.inputBox)"></button>
<input class="inputBox"></input>
</div>
....
<div class="box">
<button onclick="buttonFunction(element.inputBox)"></button>
<input class="inputBox"></input>
</div>
I then want the function 'buttonFunction(element)' to look as follows:
function buttonFunction(element){
$('.element').show()
}
Where element is the specific inputbox to the specific box div.