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

137
Views
NextJs 3rd Party Scripts dosen't work when using next/link

Hello, so im refactoring an html project to nextjs app , I have some 3rd party scripts like'jquery.min.js' ,'slick.js' and custom js files .. I'm loading those files using <Script src="assets/js/bootstrap.min.js" strategy="beforeInteractive"/> from next/script the issue is that when I use Link from nextjs to switch pages the slick functions won't work , its only work when I do hard refresh heres the code from home page index.js

  <Script
    src="assets/js/jquery.min.js"
    strategy="beforeInteractive"
   
  />
  <Script src="assets/js/bootstrap.min.js" strategy="beforeInteractive" />
  <Script src="assets/js/slick.js" strategy="beforeInteractive" />
  <Script
    src="assets/js/jquery.fancybox.min.js"
    strategy="beforeInteractive"
  />
  <Script src="assets/js/wow.js" strategy="beforeInteractive" />
  <Script src="assets/js/functions.js" strategy="afterInteractive" />

  <MainSlider images={slider_images} />
  <HomeAbout />
  <HomeDegital />
  <HomeInfluencer />
  <HomeEsport />
  <HomeSpeak />
  <HomePlatforms />
  <HomeCapmpaign />
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I fixed this issue using

<script
  dangerouslySetInnerHTML={{
    __html: `
    //The Content of function.js in here
    `,
  }}
></script>
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!