I'm using the jQuery autocomplete and I would like to underline the text being searched within the result, I looked for some examples on the web, but I only found the plugin, like this:
I tried to bring the formatted text of php
with the tags html
( <b>texto</b>
), but the autocomplete understands literally showing the tags, it should be for security reasons and I agree:)
Can you do it natively with jQuery?
Example code:
$("#pesquisax").autocomplete({
dataType: "json",
minLength: 3,
autoFocus: true,
source: function (request, response) {
$.ajax(
{
type: "POST",
url: "/solicitacao/solicitacao.localizar.nome",
dataType: "json",
data: {'term': request.term},
success: function (json) {
response(json);
}
});
}
}).autocomplete("widget").addClass("autocomplete");