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

146
Vistas
Uncaught TypeError: Cannot read properties of undefined (reading 'length') . auto-suggestion in Jquery

simple code here am trying for auto suggestion

this is my autosuggestion code for written in .js file (inside (document).ready function)

$(function () {
        var list = [
            "One",
            "two",
            "Three",
            "Four",
        ];
        debugger;
        $("#text").autocomplete({
           
            minLength: 0,
            delay: 0,  
            placeholder: "Select Transporter...",
            source: list
        });

html code

<input type="text" id="text" value="text" />

error showing as :

Uncaught TypeError: Cannot read properties of undefined (reading 'length')

not able to see any moves.after entering somthing then when i come out of textbox . this above error comes in console please help me out . and share link where i can learn and implement about auto-sugestion

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

From https://jqueryui.com/autocomplete/ make sure you imported these two CDN

<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>

final code would like this

<!doctype html>
<html>

<head>
    <title>Online jQuery Editor</title>
    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
    <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>
</head>

<body>
    <input type="text" id="text" value="text" />
</body>
<script>
    $(document).ready(function () {
        $(function () {
            var list = [
                "one",
                "two",
                "three",
                "four",
            ];
            debugger;
            $("#text").autocomplete({
                minLength: 0,
                delay: 0,
                placeholder: "Select Transporter...",
                source: list
            });
        })
    });
</script>

</html>
about 4 years ago · Juan Pablo Isaza Denunciar
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