How to customize token result format dropdwon without starting with li tag? text1
Asked
Active
Viewed 76 times
1 Answers
0
Use the resultsFormatter
property.
The default is:
function(item){ return "<li>" + item.propertyToSearch + "</li>" }
You can change this to whatever you want, e.g.
$(document).ready(function () {
$("#my-text-input").tokenInput("/url/to/your/script/", {
resultsFormatter: function(item) {
return "<p>" + item.propertyToSearch + "</p>"
}
});
});

Chris
- 5,882
- 2
- 32
- 57
-
Thanks for your response Chris. is it possible to make it as given in the html? – Martin Jose Mar 16 '15 at 04:20
-
@MartinJose - Sorry, I don't understand your question? Can you rephrase? – Chris Mar 16 '15 at 09:15