• Resolved alfredo49

    (@alfredo49)


    Hi:

    I would like to hide right arrow navigation when you are in the last slide, my slider isnt loop

    Also i would like, the same, hide ,in this case, left arrow in the first slide because is the first..

    is possible?

    Thxs!

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author simonpedge

    (@simonpedge)

    You could try the following JavaScript – I found this by doing a search:

    jQuery(document).ready(function() {
       jQuery('.owl-carousel').on('changed.owl.carousel', function(e) {
          jQuery('button.owl-next').removeAttr('disabled');
          jQuery('button.owl-prev').removeAttr('disabled');
          if (( e.page.index + 1) >= e.page.count) {
             jQuery('button.owl-next').attr('disabled', 'disabled');
          } else {
             jQuery('button.owl-next').removeAttr('disabled');
          }
          if (e.page.index == 0){
             jQuery('button.owl-prev').attr('disabled', 'disabled');
          } else {
             jQuery('button.owl-prev').removeAttr('disabled');
          }
       });
    });

    NOTE: You will have to set the “Slide By” setting for your slider to be “0“.

    Not sire if this would work, but give it a try.

    • This reply was modified 3 years, 9 months ago by simonpedge.
    Thread Starter alfredo49

    (@alfredo49)

    Hi:

    Thxs for the code!

    But in my case not run ?? , also if i put “Slide by” to 0, then, loop automatically is enabled (on this way when you click in left arrow in the first slide and jumps to last slide).

    Searching i think i found the solution:

    .owl-prev.disabled , .owl-next.disabled{
    opacity:0;
    }

    Loop is inactive, this css code runs!

    Plugin Author simonpedge

    (@simonpedge)

    Ok, good stuff! ??

    Hopefully someone else who’s trying to implement the same thing stumbles across this topic.

    and I did!
    Thanks for sharing @alfredo49

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Anyway to hide right arrow navigation in last slide (slider no loop)’ is closed to new replies.