| Current Path : /home/purehotels/public_html/templates/purehotels/js/ |
| Current File : /home/purehotels/public_html/templates/purehotels/js/slider-hotel.js |
(function($) {
$(function() {
//ARTICLE SLIDERS
//HOTEL SLIDER
var jcarousel = $('.jcarousel');
jcarousel
.on('jcarousel:reload jcarousel:create', function () {
var carousel = $(this),
width = carousel.innerWidth();
if (width >= 500) {
width = width / 3;
} else if (width >= 350) {
width = width / 2;
}
if( $('.jcarousel').hasClass('one') ){width = carousel.innerWidth();}
carousel.jcarousel('items').css('width', Math.ceil(width) + 'px');
})
.jcarousel({
wrap: 'circular'
});
$('.jcarousel-control-prev')
.jcarouselControl({
target: '-=2'
});
$('.jcarousel-control-next')
.jcarouselControl({
target: '+=1'
});
});
})(jQuery);