0
0
0348raven2016-01-23 19:18:00
JavaScript
0348raven, 2016-01-23 19:18:00

OWl - how to hide the navigation with a certain number of elements?

var owlItem = $("b-owl__el-item");

    $(owlItem).each(function(){
        if($(this).length < 6) {
            $(".b-owl__navigation__el-next").css('display', 'none');
            $(".b-owl__navigation__el-prev").css('display', 'none');
        }
        else {
            $(".b-owl__navigation__el-next").css('display', '');
            $(".b-owl__navigation__el-prev").css('display', '');
        }
        console.log(owlItem.length);
    });


Everything worked before. I can't figure out why it doesn't return.

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pashenka, 2016-01-23
@0348raven

var owlItem = $("b-owl__el-item");
Point where?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question