I want to get the content of the `P' tag from the following html code using jQuery.
<div id="div_id_disciplina" class="form-group ">
<label for="id_disciplina" class="control-label ">
Disciplina
</label>
<div class="">
<ul class="token-input-list-facebook">
<li class="token-input-token-facebook">
<p>Áudio e Vídeo</p>
<span class="token-input-delete-token-facebook">×</span>
</li>
<li class="token-input-input-token-facebook">
<input type="text" autocomplete="off" id="token-input-id_disciplina">
</li>
</ul>
<textarea class="form-control" id="id_disciplina" name="disciplina"></textarea>
</div>
How to achieve it? Thanks in advance.
Query it with $('p')
and use the .text()
function to get the innerHTML as text.
$('p').text()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With