ques-G3YA3bWG

Search A2Z 24

Question : Owl Carousel, navigation disabled after reaching first/last item.

I'm trying to use owl carousel.

I want to disable the navigation after it reach first/last item,

for example by adding "disabled" class in navigation then disable it via css.

Is it possible?

asked February 12, 2017

1 Answers

Dispalying 1 to 1 of 1 |

You can use callback afterAction

 afterAction: function(){
      if ( this.itemsAmount > this.visibleItems.length ) {
        $j('.owl-prev').show();
        $j('.owl-next').show();
        if ( this.currentItem == 0 ) {
          $j('.owl-prev').hide();
        }
        if ( this.currentItem == this.maximumItem ) {
          $j('.owl-next').hide();
        }

      } else {
        $j('.owl-prev').hide();
        $j('.owl-next').hide();
      }
}
See comments (0) | Comment
Answered 5 Months ago
Dispalying 1 to 1 of 1 |

Write your Answer write code <pre class="brush: xml">---code---</pre>

Login as a member to access answering block !! click-here
loading...

Reveal Modal Goodness

This is a default modal in all its glory, but any of the styles here can easily be changed in the CSS.

This is just a simple modal with the default styles, but any type of content can live in here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quis sem vel enim eleifend tristique. Etiam tincidunt faucibus pharetra.

×