ques-G3YA3bWG

Search A2Z 24

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

X

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 More than a year 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...

×