hi i've find the issue about the to.owl.carousel giving error.
It have problem when you specify dots=false in the option.
If you omit it or you set it to true it works normally.
I can confirm this is the case. I came to report the same exact bug. I need to be able to call the this without dots!
So, a work around for right now is to always set "dots:true" for your config. Then just remove the element with JavaScript after the carousel has been initiated. It looks like without dots, perhaps the navigation plugin doesn't get initiated.
I've already fixed that, but there are some unfinished tasks before I'm able to release and currently I can't find any spare time to finish. Hopefully I'll push within the next weeks. Sorry for the delay.
I ran into the same issue just now and started fixing this on my own. Will it be worth the effort or 岷乮ll it be just a few days until you push the fix?
We just ran into the same error. The _pages array in the overwritten Navigation.to function is always empty when you don't use dots or slideBy='page'.
Removing the condition around this block https://github.com/OwlFonk/OwlCarousel2/blob/develop/src/js/owl.navigation.js#L236-L252 fixed the issue. But I'm not sure if this has other negative side effects.
Or you can just set the normal param to true when triggering it. That way you don't need to change anything in the codebase.
$('.owl-carousel').trigger( 'to.owl.carousel', [n,speed,true] );
This is something that we should work to fix. Here's a test case with beta 3 highlighting the issue.
@aleroy -You awersome dude !!!
$('.owl-carousel').trigger( 'to.owl.carousel', [n,speed,true] );
This code works for me
Hi,
pagination:false,
navigation:true
try this
Most helpful comment
Or you can just set the
normalparam totruewhen triggering it. That way you don't need to change anything in the codebase.