Info callback.

Variable Value
items
allItems
currentPosition
currentPage
allPages
autoplay
windowWidth
elWidth
breakpoint

Descripton

'info' option is the only function callback in Owl Carousel 2 and doesnt need to be activated by option callback:true. Can be used to obtain basic information about items/pages/widths etc.

Info function has two parameters. First is object that containes information, second is Owl non jquery object reference.
Note that Item and page positions are zero based values. If you need more specific variables there just let me know.


//Javascript

$('.owl-carousel').owlCarousel({
	items:1,
	loop:true,
	nav:true,
	margin:10,
	info: getInfo,
	responsive:{
		600:{
			items:3
		},			
		960:{
			items:5,
			center:true
		},
		1200:{
			items:6,
			center:false
		}
	}
});

// Insert info into table
function getInfo(i){
	var owlInfo = i,prop,value,name;

	for(prop in owlInfo){
		if(owlInfo.hasOwnProperty(prop)){
			value = owlInfo[prop];
			name = prop;
			$('.'+name).text(value);
		}
	}
}