I am using jquery tag-it & jquery UI plug-ins in my application, here I whould like to edit the tag-it suggestion list items in order to show profile pic, name & email id same as outlook please guid me.
Loading
I am using jquery tag-it & jquery UI plug-ins in my application, here I whould like to edit the tag-it suggestion list items in order to show profile pic, name & email id same as outlook please guid me.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Apr 26, 2023, 10:45 AM
To customize the suggestion list items in jquery tag-it, you will need to modify the rendering of the suggestion list items. Here are the general steps to achieve this:
Customize the data source: You will need to customize the data source of the tag-it plugin to include the profile picture, name, and email ID. You can do this by providing a custom data source function that returns an array of objects, each object representing a suggestion item with profile picture, name, and email ID properties.
Customize the rendering: Once you have modified the data source, you can customize the rendering of the suggestion list items. You can use the
renderItemoption of the tag-it plugin to provide a custom rendering function. This function should take the suggestion item object as an argument and return an HTML string that represents the suggestion list item with the profile picture, name, and email ID.Here's an example code snippet that demonstrates how to achieve this:
Thanks