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

322
Views
Uncaught TypeError: Cannot read properties of null (reading 'setAttribute')

My script is working perfectly only with html, but when I export to wordpress it doesn't work and this appears I would like to know some way to request it, I'm a beginner in javascript, but I'm trying to apply the writing effect but it doesn't work:

<span class="js-typedjs"
                          data-hs-typed-options='{
                            "strings": ["de você.", "da sua família."],
                            "typeSpeed": 90,
                            "loop": true,
                            "backSpeed": 30,
                            "backDelay": 2500
                          }'></span>

enter image description here

This one doesn't work either:

<script>
    
      (function() {
        // INITIALIZATION OF MEGA MENU
        // =======================================================
        const megaMenu = new HSMegaMenu('.js-mega-menu', {
          desktop: {
            position: 'left'
          }
        });

        // INITIALIZATION OF SHOW ANIMATIONS
        // =======================================================
        new HSShowAnimation('.js-animation-link')


        // INITIALIZATION OF BOOTSTRAP VALIDATION
        // =======================================================
        HSBsValidation.init('.js-validate', {
          onSubmit: data => {
            data.event.preventDefault()
            alert('Submited')
          }
        })


        // INITIALIZATION OF GO TO
        // =======================================================
        new HSGoTo('.js-go-to')


        // INITIALIZATION OF NAV SCROLLER
        // =======================================================
        new HsNavScroller('.js-nav-scroller')


        // INITIALIZATION OF TEXT ANIMATION (TYPING)
        // =======================================================
        const typed = HSCore.components.HSTyped.init('.js-typedjs')
      })()
    </script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you don't use the animation effect, you can remove this part or the "js-animation-link" class from your HTML:

  // INITIALIZATION OF SHOW ANIMATIONS
    // =======================================================
    new HSShowAnimation('.js-animation-link')

If you do use the CSS class "js-animation-link", you need to add the element as "targetSelector" in the options, for example:

<a class="js-animation-link" href="javascript:;" role="button"
   data-hs-show-animation-options='{
       "targetSelector": "#signupModalFormLogin",
       "groupName": "idForm"
   }'>Log in here</a>

Or, in this documentation they use data-target: https://htmlstream.com/preview/front-v2.9.2/documentation/hs-libraries/show-animation.html#how-to-use

  <a class="js-animation-link btn btn-sm btn-outline-secondary btn-sm-wide active" href="javascript:;"
 data-target="#firstContent"
 data-link-group="groups"
 data-animation-in="slideInUp">First content</a> 
about 4 years ago · Juan Pablo Isaza Report
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!