How do I get the option
object with Jquery specifically this:
$('#nome_responsavel').blur(function () {
var id = $('option[value="'+$('#nome_responsavel').val()+'data-toggle=p"]').attr('id');
alert(id);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"></script><label>Nome</label><inputtype="text" class="form-control" name="nome_responsavel" list="list_nome" id="nome_responsavel" required>
<datalist id="list_nome">
<option id="1" value="teste" data-toggle="p">teste</option>
<option id="2" value="teste2" data-toggle="p">teste2</option>
</datalist>