Code: Select all
$("#jTagLabel").autocomplete({
source: [
{
label: "aardvark",
value: "aardvark"
},
{
label: "apple",
value: "apple"
},
{
label: "<i>atom</i>",
value: "atom"
}
]
,html:true
});
I have the following autocomplete, I want to add an action to the label, for example selecting an option triggers a javascript function, but how? I have HTML enabled on the labels as well, I managed to trigger a js function with an onclick event for each of the labels but it only works when the user clicks on a label, not if it is selected with the enter key. What I want is to trigger a javascript function with a second value other than the label itself to make some magic.
Thanks.