slickR icon indicating copy to clipboard operation
slickR copied to clipboard

Replace a slide?

Open dcaud opened this issue 4 years ago • 1 comments

I want to replace a slide (without updating all slides because that would be slow).

I was thinking that the add-remove function could work, but I can't figure out how to do that in slickR.

Here's the add-remove function from http://kenwheeler.github.io/slick/:

$('.add-remove').slick({
  slidesToShow: 3,
  slidesToScroll: 3
});
$('.js-add-slide').on('click', function() {
  slideIndex++;
  $('.add-remove').slick('slickAdd','<div><h3>' + slideIndex + '</h3></div>');
});

$('.js-remove-slide').on('click', function() {
  $('.add-remove').slick('slickRemove',slideIndex - 1);
  if (slideIndex !== 0){
    slideIndex--;
  }
});

Can you point me to how this might be done?

Thanks!

dcaud avatar Dec 03 '21 17:12 dcaud

Thanks for opening the issue. That functionality is not accessible directly through slickR. You could probably do it through shiny with direct JS if you want.

yonicd avatar Dec 03 '21 18:12 yonicd