How to register new in autocomplete

Asked

Viewed 114 times

2

I don’t know if this is the right place to ask, but I always see the following component in some systems:

inserir a descrição da imagem aqui

I would like to know, which plugin is this? If it is just jquery ui autocomplete, how is that button to add?

1 answer

3


I also don’t know what this plugin is (if you put the link in the question we can be more specific) but this is very simple to do. Just have a hidden div that is visible in the focus of the first. You can even do it only with CSS and sibling selectors.

With some work on CSS you can look whatever you want.

Example:

div{
    opacity: 0;
    transition: opacity 1s;
    
}

#meuInput:focus ~ div{
    opacity: 1
}
<input type="text" id="meuInput" />
<div><button>Adicione mais um!</button></div>

It may also be the case that this button is inside the first (and only in the example) option of a select...

  • Hi @Sergio, I do not know which plugin is, I saw on an online system that I downloaded, but your solution seems very similar to theirs, probably the same thing they do, a mix with what you did + jquery ui autocomplete... thanks for the reply

Browser other questions tagged

You are not signed in. Login or sign up in order to post.