Slick: Force left/right buttons to appear

Created on 5 Jun 2014  路  2Comments  路  Source: kenwheeler/slick

Hello. Is there any way to force right/left buttons to always appear even if they are not needed? For example, https://kenwheeler.github.io/slick/ there is an "Add & remove" example and no buttons is shown initially - how can I override this behavior? Thanks in advance!

Most helpful comment

To make left & right buttons appear always, add arrows:false to your settings

$('.carousel-selector').slick({
...
arrows: false,
...
});

and then tie the buttons/links you want to use as left & right buttons to slick as below

$('.left-selector').on('click', function(){
  $('.carousel-selector').slickNext();
});
$('.right-selector').on('click', function(){
  $('.carousel-selector').slickPrev();
});

Hope this helps.

All 2 comments

To make left & right buttons appear always, add arrows:false to your settings

$('.carousel-selector').slick({
...
arrows: false,
...
});

and then tie the buttons/links you want to use as left & right buttons to slick as below

$('.left-selector').on('click', function(){
  $('.carousel-selector').slickNext();
});
$('.right-selector').on('click', function(){
  $('.carousel-selector').slickPrev();
});

Hope this helps.

@metinucar Yeah, really, that is the easiest way. Thank you!

Was this page helpful?
0 / 5 - 0 ratings