Owl Carousel show navigation by items instead of always
up vote
0
down vote
favorite
In My project, i have used Owl Carousel and it slides nicely for web as well as responsive mode.
But There is a issue that if i have only 2 items(or 1 item on responsive mode) then how can i hide navigation ?
My script
$(document).ready(function () {
var carouselElement1 = $('.owl-carousel-Product');
initialize_owl(carouselElement1);
function initialize_owl(el) {
el.owlCarousel({
dots: false,
center: false,
loop: true,
margin: 15,
items: 4,
responsiveClass: true,
responsive: {
0: {
items: 1,
nav: true
},
481: {
items: 2,
nav: true
},
767: {
items: 3,
nav: true,
},
1199: {
items: 4,
nav: true,
}
},
lazyLoad: true,
autoplay: false,
autoplayTimeout: 3000,
autoplayHoverPause: true,
autoHeight: false
});
}
});
});
Please suggest me how can i fix it. I guess there should be any event for this.
Please help me.
Thank you
javascript owl-carousel
add a comment |
up vote
0
down vote
favorite
In My project, i have used Owl Carousel and it slides nicely for web as well as responsive mode.
But There is a issue that if i have only 2 items(or 1 item on responsive mode) then how can i hide navigation ?
My script
$(document).ready(function () {
var carouselElement1 = $('.owl-carousel-Product');
initialize_owl(carouselElement1);
function initialize_owl(el) {
el.owlCarousel({
dots: false,
center: false,
loop: true,
margin: 15,
items: 4,
responsiveClass: true,
responsive: {
0: {
items: 1,
nav: true
},
481: {
items: 2,
nav: true
},
767: {
items: 3,
nav: true,
},
1199: {
items: 4,
nav: true,
}
},
lazyLoad: true,
autoplay: false,
autoplayTimeout: 3000,
autoplayHoverPause: true,
autoHeight: false
});
}
});
});
Please suggest me how can i fix it. I guess there should be any event for this.
Please help me.
Thank you
javascript owl-carousel
anyone is there to help me please.
– Vijay Gupta
Nov 15 at 5:56
Guys, I solved it $('.owl-carousel').owlCarousel({}); var carousel = $('.owl-carousel').data('owlCarousel'); // and then you can use this function on window resize or do whatever you like if (carousel._items.length <= carousel.settings.items) { carousel.settings.nav = false; }
– Vijay Gupta
Nov 15 at 14:58
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In My project, i have used Owl Carousel and it slides nicely for web as well as responsive mode.
But There is a issue that if i have only 2 items(or 1 item on responsive mode) then how can i hide navigation ?
My script
$(document).ready(function () {
var carouselElement1 = $('.owl-carousel-Product');
initialize_owl(carouselElement1);
function initialize_owl(el) {
el.owlCarousel({
dots: false,
center: false,
loop: true,
margin: 15,
items: 4,
responsiveClass: true,
responsive: {
0: {
items: 1,
nav: true
},
481: {
items: 2,
nav: true
},
767: {
items: 3,
nav: true,
},
1199: {
items: 4,
nav: true,
}
},
lazyLoad: true,
autoplay: false,
autoplayTimeout: 3000,
autoplayHoverPause: true,
autoHeight: false
});
}
});
});
Please suggest me how can i fix it. I guess there should be any event for this.
Please help me.
Thank you
javascript owl-carousel
In My project, i have used Owl Carousel and it slides nicely for web as well as responsive mode.
But There is a issue that if i have only 2 items(or 1 item on responsive mode) then how can i hide navigation ?
My script
$(document).ready(function () {
var carouselElement1 = $('.owl-carousel-Product');
initialize_owl(carouselElement1);
function initialize_owl(el) {
el.owlCarousel({
dots: false,
center: false,
loop: true,
margin: 15,
items: 4,
responsiveClass: true,
responsive: {
0: {
items: 1,
nav: true
},
481: {
items: 2,
nav: true
},
767: {
items: 3,
nav: true,
},
1199: {
items: 4,
nav: true,
}
},
lazyLoad: true,
autoplay: false,
autoplayTimeout: 3000,
autoplayHoverPause: true,
autoHeight: false
});
}
});
});
Please suggest me how can i fix it. I guess there should be any event for this.
Please help me.
Thank you
javascript owl-carousel
javascript owl-carousel
edited Nov 13 at 13:36
asked Nov 13 at 13:21
Vijay Gupta
134
134
anyone is there to help me please.
– Vijay Gupta
Nov 15 at 5:56
Guys, I solved it $('.owl-carousel').owlCarousel({}); var carousel = $('.owl-carousel').data('owlCarousel'); // and then you can use this function on window resize or do whatever you like if (carousel._items.length <= carousel.settings.items) { carousel.settings.nav = false; }
– Vijay Gupta
Nov 15 at 14:58
add a comment |
anyone is there to help me please.
– Vijay Gupta
Nov 15 at 5:56
Guys, I solved it $('.owl-carousel').owlCarousel({}); var carousel = $('.owl-carousel').data('owlCarousel'); // and then you can use this function on window resize or do whatever you like if (carousel._items.length <= carousel.settings.items) { carousel.settings.nav = false; }
– Vijay Gupta
Nov 15 at 14:58
anyone is there to help me please.
– Vijay Gupta
Nov 15 at 5:56
anyone is there to help me please.
– Vijay Gupta
Nov 15 at 5:56
Guys, I solved it $('.owl-carousel').owlCarousel({}); var carousel = $('.owl-carousel').data('owlCarousel'); // and then you can use this function on window resize or do whatever you like if (carousel._items.length <= carousel.settings.items) { carousel.settings.nav = false; }
– Vijay Gupta
Nov 15 at 14:58
Guys, I solved it $('.owl-carousel').owlCarousel({}); var carousel = $('.owl-carousel').data('owlCarousel'); // and then you can use this function on window resize or do whatever you like if (carousel._items.length <= carousel.settings.items) { carousel.settings.nav = false; }
– Vijay Gupta
Nov 15 at 14:58
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53281944%2fowl-carousel-show-navigation-by-items-instead-of-always%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
anyone is there to help me please.
– Vijay Gupta
Nov 15 at 5:56
Guys, I solved it $('.owl-carousel').owlCarousel({}); var carousel = $('.owl-carousel').data('owlCarousel'); // and then you can use this function on window resize or do whatever you like if (carousel._items.length <= carousel.settings.items) { carousel.settings.nav = false; }
– Vijay Gupta
Nov 15 at 14:58