Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
How to customize 'Previous' and 'Next' buttons in 'Slick' slider

I created a carousel using 'Slick' but I want to change the 'Previous' and 'Next' buttons into arrows. How do I do that?

This is my code:

$('.horizontal').slick({
  slidesToShow: 2,
  slidesToScroll: 1,
  autoplay: true,
  autoplaySpeed: 100,
});
#slider img {
  width: 350px;
  height: 350px;
  margin-right: 100px;
}
<section id="slider" style="background-color:#fefefe;height: 800px;">
  <div class="horizontal">
    <img src="images/imags/1.jpg" class="before_after">
    <img src="images/imags/2.jpg" class="before_after">
    <img src="images/imags/3.jpg" class="before_after">
    <img src="images/imags/4.jpg" class="before_after">
    <img src="images/imags/5.jpg" class="before_after">
    <img src="images/imags/6.jpg" class="before_after">
    <img src="images/imags/8.jpg" class="before_after">
    <img src="images/imags/9.jpg" class="before_after">
    <img src="images/imags/10.jpg" class="before_after">
    <img src="images/imags/11.jpg" class="before_after">
    <img src="images/imags/12.jpg" class="before_after">
    <img src="images/imags/13.jpg" class="before_after">
    <img src="images/imags/14.jpg" class="before_after">
    <img src="images/imags/15.jpg" class="before_after">
    <img src="images/imags/16.jpg" class="before_after">
  </div>
</section>

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

You can use prevArrow and nextArrow to customize the code from your arrows. Something like this:

$('.horizontal').slick({
  slidesToShow: 2,
  slidesToScroll: 1,
  autoplay: true,
  autoplaySpeed: 100,
  prevArrow: '<button type="button" class="slick-custom-arrow slick-prev"> < </button>',
  nextArrow: '<button type="button" class="slick-custom-arrow slick-next"> > </button>'
});

Then you style it with css. You can change the button elements to an a, or anything you like. Also you can append the arrows elsewhere, outside of your carousel, with appendArrows. Just select an element and pass it as a parameter.

var $element = $('.js-arrow-wrapper');

$('.horizontal').slick({
  slidesToShow: 2,
  slidesToScroll: 1,
  autoplay: true,
  autoplaySpeed: 100,
  appendArrows: $element
});
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda