showing results for - "how to disable bootstrap prev 28next 29 arrow on first 28last 29 slide"
Simona
19 Mar 2019
1$('.carousel').carousel({
2    interval: false,
3})
4
5$(document).ready(function () {               // on document ready
6    checkitem();
7});
8
9$('#myCarousel').on('slid.bs.carousel', checkitem);
10
11function checkitem()                        // check function
12{
13    var $this = $('#myCarousel');
14    if ($('.carousel-inner .item:first').hasClass('active')) {
15        // Hide left arrow
16        $this.children('.left.carousel-control').hide();
17        // But show right arrow
18        $this.children('.right.carousel-control').show();
19    } else if ($('.carousel-inner .item:last').hasClass('active')) {
20        // Hide right arrow
21        $this.children('.right.carousel-control').hide();
22        // But show left arrow
23        $this.children('.left.carousel-control').show();
24    } else {
25        $this.children('.carousel-control').show();
26    }
27}
28
29