1
I am using jQuery autocomplete and would like to underline inside the result the text being searched, I looked for some examples on the web, but only found with plug-in, like this:
I tried to bring the formatted text from 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 :)
You can 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");
Put the relevant part of the code that has sff. Mainly the part that makes the autocomplete
– Miguel
On the link you passed, have an example using jquery just change the class
.autocomplete-suggestions strong {
 color: #18324f;
 font-weight: normal;
 text-decoration: underline;
}
– Ivan Ferrer