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

119
Vistas
Find all images whose source attribute value ends with some string

How can one find all images whose source ends with for example "xyz.jpg"?

Using jQuery?

When I do: jQuery("img[src$='xyz.jpg']") what am I getting back?
Is this an array-like thing or not? I am confused.

Seems like I am getting a single object. How can I get all such objects?

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

0

jQuery('.some-selector') (or $('.some-selector')) returns a jQuery object (https://api.jquery.com/Types/#jQuery).

A jQuery objects behaves very much like an array of DOM elements. It has a length property and you can access these elements by index ($('.some-selector')[0]), but it is not a true array, and you won't find the common Array methods on this object.

So yes it return a single jQuery object, but that object might consist of zero, one or multiple DOM elements that matched your selector.

When you access the DOM elements in the jQuery collection you get "raw" DOM elements, i.e. you cannot use jQuery methods on them. Typically you would use jQuery methods on the entire collection, or rewrap individual elements in jQuery.

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