Hi I would like to know how to extract the value of a <input id="tipo"/>
child from a <div class="box-header">
these elements of DOM
are repeated but not their values, the values are used to set a local storage, there is someone who can help me with a suggestion, I am interested in learning to refer to the children elements with jquery, the structure is as follows
<script>
$(document).ready(function () {
$('.box-header').click(function () {
alert("clickeed")
var tipo = $('b').parent('.box-header').val();
localStorage.setItem("tipoDocto", tipo);
//var tipo = $('#tipo').val();
//
// localStorage.setItem("tipo", tipo);
});
});
</script>
<div id="este" class="box-header" data-widget="collapse" >
<img id="lupa" src="css/galeria/zoom.png"
style="float:left; width:14px;height:18px; margin-left:2%;margin-top: 3%;" />
<h2 class="box-title" display="block"
style="float:left; margin-left:2%;"> {{item.documentos}} </h2>
<img id="change" src="css/galeria/down.png"
style="float:right; width:7%;margin-right: 5%; margin-top: 4%;" />
<input type="text" id="tipo" readonly>{{item.clave}}</>
<div class="box-tools pull-right">
</div>
</div>