Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
¿Cómo configurar la función inyectada en la parte inferior del sitio web?

Tengo un sitio web que carga un código JS de la URL que tiene la función select2() , pero no sé por qué no puedo llamarlo o usarlo usando un script inyectado (extensión de Chrome) y obtuve Uncaught TypeError: $(...).select2 is not a function . Pero puedo ejecutar la sintaxis de JQuery mediante el script inyectado, la diferencia es el script JQuery.min.js cargado dentro de la etiqueta <head> pero ese script select2 está dentro de la etiqueta <body> . ¿Hay alguna forma de acceder a la función selec2() sin cambiar el sitio web (como reorganizar el script u otros)? ¡gracias!

Este es el script de mi extensión personalizada de Chrome

 const batchscp = function(){ const injectElement = document.createElement('div'); injectElement.className = "custombtn btn"; injectElement.id = "mybtn"; $('body').append(injectElement); spn = //many html elements to inject which contain a button with id=auto $('#mybtn').append(spn); } batchscp(); $('#auto').click(function (e) { e.preventDefault(); $('.select2').select2(); //Uncaught TypeError: $(...).select2 is not a function $('#logisticsAdd').val('65').trigger('change'); });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!