Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

140
Visualizações
How to print out the final selector in a jQuery method chain

If I have the following jQuery chain

 let mpath = $('.wlc2022.confirm').find('.something');

how can I print out ".something" or "something" (in either jQuery or raw JavaScript syntax) to the console window because its the last selector that mpath is looking for?

I have tried...

console.log(mpath.val)
console.log(mpath.value)

But nothing so far...

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

There is no API for that in modern (post-3.0) versions of jQuery. There used to be a .selector property on jQuery objects, but it was removed because it was unreliable.

Note also that mpath itself is not "looking for" anything; it gets the result of the jQuery-based expression. Probably the best way to do what you want would be to construct some sort of utility around that expression pattern, and have it retain that last selector and make it available somehow.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda