I have this line
<li id="liPryName"> <span><i class="glyphicon glyphicon-folder-open"></i></span> <div class="id">Valor de Id</div></li>
I would like with jquery to be able to access the value of class="id"
by clicking on itid="liPryName"
I've tried this, but it doesn't give the result I want. Inside <Li>
I need to find the value of class="id".
$("#liPryName").dblclick(function () {
alert($(this).html());
})
You can achieve what you want with
.find()
like this:You can do it with
children
: