hemc4
hemc4

Reputation: 1633

jquery autocomplete remove option trigger function

I am using jQuery auto complete to filter a list. On select it display one particular item and hides others

Now i want to add a cross icon to remove this selection, when click on it the input box will be reset and a java script function will be called.

enter image description here

 $( "#name_input" ).autocomplete({

                source: availableTags,
                select: function (event, ui) {



                    var selectedObj = ui.item;                
                    filterByName(selectedObj.value);
                    //console.log(selectedObj.value);
                }

            });

How can i add the cross button on input?

Upvotes: 1

Views: 1301

Answers (1)

Vikarn Singh Mankotia
Vikarn Singh Mankotia

Reputation: 326

Hey hi Hemc, I hope i understood your problem, you should try out chosen jquery.Chosen git hub

I hope this would solve your problem.

Buddy i found a solution for you go to this link (xoxco.com/projects/code/tagsinput) – Vikarn Singh Mankotia

Upvotes: 2

Related Questions