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

309
Vistas
AJAX call : JQuery ok but Vue and Vanilla JS not executing script inside element

I would like to execute a code inside an html element after an xhr request

I used to used JQUERY $(el).html(data) and that worked just fine

Now trying to get rid of jquery

I tried both vanilla JS innerHTML and vue3 v-html but the script never executes

I can see it in html

enter image description here

Here is the code:

    axios.get('/getAarea/blog')
        .then(response => {
          const data = response.data;
          if (!data.report) {
            const el = $("#ContentUserPanel")
            el.html(data)
            this.loading = false
            this.selected = this.types.blogs
            this.toggleUserMobileMenu()
          } else {
            Error('There was an error ',data.report)
            this.loading = false
            this.selected = null
          }
        })
        .catch(err => {
          Error('There was an error ',err)
          this.loading = false
          this.selected = null
        });

Could someone explain ?

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