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

130
Views
I have an issue with Slick.js

I'm using a WordPress plugin to create several carousels of posts on my homepage which uses Slick.js to create them.

I have created a tab menu with four categories / carousels, so that when I click on any of the items in the menu, that carousel is displayed while the others are hidden.

I hide all the carousels when the homepage is loaded, and I just display the first one that belongs to the first item in the menu.

On desktop, the script is working perfectly, and all the images and text inside the different carousels are displayed beautifully. But on mobile, it seems that carousels are hidden before all the posts (image, title and text) inside are loaded and the space they occupy is calculated.

I'm writing below the code I'm using to show you what I'm doing. Maybe the code is wrong, as I'm not an expert on Javascript (jQuery). In any case, how could I reset the carousels when I click on any item menu, so that all the posts inside are recalculated by Slick again?

jQuery(window).on('load', function () {jQuery('#' + parents_siblings_id).animate({ opacity: 0, zIndex: -99 }, 600, function() {jQuery(window).on('load', function () {
  jQuery('#' + parents_siblings_id).animate({ opacity: 0, zIndex: -99 }, 600, function() {jQuery("#carousel_2").parents('.carousel-wrapper').parent().addClass("hidden");jQuery("#carousel_3").parents('.carousel-wrapper').parent().addClass("hidden");jQuery("#carousel_4").parents('.carousel-wrapper').parent().addClass("hidden");});});});});

Thanks in advance!

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!