Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

108
Vistas
Add href to auto complete list

I need a little help with jquery. I am trying to add link functionality to an auto complete list. Basically, it displays suggested links based on what is typed in the input. Below are the scripts that produce only the auto complete...

I am using a plugin (omitted from this post), but it can be viewed here if needed: https://www.cssscript.com/demo/autocomplete-typeahead-bootstrap-5/autocomplete.js

My code at the bottom of the HTML:

  <script>
    var datasrc = [
      {label: 'About', value: 'about.html'},
      {label: 'Components', value: 'components.html'},
      {label: 'Usage', value: 'usage.html'},
    ]
    const ac = new Autocomplete(document.getElementById('autosuggest'), {
      data: datasrc,
      treshold: 1,
      maximumItems: 8,
      onSelectItem: ({label, value}) => {
        console.log("user selected:", label, value);
      }
    });
  </script>

I ran into this post: JQuery Autocomplete Where the Results are Links - but I'm not sure how to integrate an "event function" into the above code.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda