I want to get the value of hidden hidden by jQuery in the framework of the proposed listener. The script below gives undefined. Where is the mistake?
$('.mdl-list__item').click(function (point) { var distrib = $(point).children('.name').val(); console.log(distrib); // undefined }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> <li class="mdl-list__item"> <span class="mdl-list__item-primary-content"> <i class="material-icons mdl-list__item-icon"> local_cafe </i> <span class="mdl-badge" data-badge="0"> Пивоварня 3 </span> </span> <input type="hidden" class='name' value="beer3"> </li>