$("#slider").slider({
value : startPos,
min : 0,
max : maxPos-2,
step : 1,
create: function( event, ui ) {
val = $( "#slider" ).slider("value");
$( "#contentSlider" ).html( val );
},
slide: function( event, ui ) {
$( "#contentSlider" ).html( ui.value );
$('.area-range').trigger('to.owl.carousel', [ui.value, 300]);
}
});