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

185
Views
El script de filtro y el carrusel de búhos no funcionan juntos

Tengo tanto el script de carrusel de búho como el script de filtro en mi archivo js. De alguna manera, debido a algunas razones, mis botones de filtro no cambian de color al modo activo como se esperaba. Cuando elimino el código del script del carrusel, los botones se comportan perfectamente, pero pierdo las imágenes y el contenido del carrusel. Un poco de ayuda sería suficiente.

 //START OF CAROUSEL $(document).ready(function () { // top-ads owl carousel $("#top-ads .owl-carousel").owlCarousel({ dots: true, items: 1, loop: true, margin: 10, autoplay: true, autoplayTimeout: 3500, autoplayHoverPause: true }); // top-ads owl carousel $(".owl-carousel").owlCarousel({ dots: true, items: 1, }); }); //END OF CAROUSEL //START OF FILTER BUTTONS filterSelection("all") function filterSelection(c) { var x, i; x = document.getElementsByClassName("filterDiv"); if (c == "all") c = ""; for (i = 0; i < x.length; i++) { peetRemoveClass(x[i], "show"); if (x[i].className.indexOf(c) > -1) peetAddClass(x[i], "show"); } } function peetAddClass(element, name) { var i, arr1, arr2; arr1 = element.className.split(" "); arr2 = name.split(" "); for (i = 0; i < arr2.length; i++) { if (arr1.indexOf(arr2[i]) == -1) { element.className += " " + arr2[i]; } } } function peetRemoveClass(element, name) { var i, arr1, arr2; arr1 = element.className.split(" "); arr2 = name.split(" "); for (i = 0; i < arr2.length; i++) { while (arr1.indexOf(arr2[i]) > -1) { arr1.splice(arr1.indexOf(arr2[i]), 1); } } element.className = arr1.join(" "); } var btnContainer = document.getElementById("myBtnContainer"); var btns = btnContainer.getElementsByClassName("selections"); for (var i = 0; i < btns.length; i++) { btns[i].addEventListener("click", function () { var current = document.getElementsByClassName("active"); current[0].className = current[0].className.replace(" active", ""); this.className += " active"; }); } //END OF FILTER BUTTONS

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!