Well that, I'm trying to show me one tooltip
in an input field and it doesn't show me, I don't know where I'm having the error.
//Javascript (JQuery)
$(function test()
{
var valor = $("#nombre").val();
if( valor == null || valor.length == 0) {
$("#nombre").tooltip({
content: "texto de prueba"
});
return false;
} else { return true;}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<input type="text" id="nombre" onclick="test();">
Sure it's silly but I can't visualize it.
It was missing to add the proper libraries, and the title attribute in the input
$(function test()
replace it withfunction test()
without the dollar sign at the beginning.