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

314
Views
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
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!