Removing slide on click
See original GitHub issueHi,
I’m having a frustrating time trying to remove slides when clicked. I think the problem lies in me not getting the correct index required for the ‘slickRemove’ method.
both of these do not work:
function onClicked(){
$('#myslider').slick('slickRemove', $(this).index($('#myslider').slick.$slides));
}
function onClicked(){
$('#myslider').slick('slickRemove', $(this).attr('data-slick-index'));
}
the second one works at first, but as slides are removed ‘data-slick-index’ attr is not updated so the wrong slides start getting removed.
Hopefully there is an obvious solution that I am missing.
Thanks, Damon.
Issue Analytics
- State:
- Created 8 years ago
- Comments:13
Top Results From Across the Web
Add and delete slides in PowerPoint - Microsoft Support
Single slide - Right-click and select Delete Slide. · Multiple slides - Hold Ctrl and select the slides you want then right-click and...
Read more >Slick Slider - How to Remove Specific Slides On Click
I am trying to make it work so you can remove a specific slide based on which one is clicked. <div class="slider add-remove...
Read more >How to delete a slide in PowerPoint - Adobe
To remove multiple slides at a time, hold the Ctrl key and click on the slides you want to remove. Then, just press...
Read more >How to Delete a Slide in a PowerPoint Presentation
1. Open your PowerPoint presentation and right-click (or hold Control as you click) any slide you want to delete in the left sidebar....
Read more >How to Quickly Remove All Animation in PowerPoint
Removing animation on one or more slides · In Normal View, display the slide with the animation you want to remove. · Click...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not sure if it’s much help, but I worked around my problem by doing a refresh after removing a slide:
$(".slickContainer").slick('slickRemove', curSlide, false).slick('refresh');
Does the data-slide-index update requires adding below snippet to slickRemove API?
_.$slides.each(function(index, element) { $(element).attr(‘data-slick-index’, index); });