[Code]
https://github.com/rin316/jquery.liquidCarousel
[Download]
https://github.com/rin316/jquery.liquidCarousel/zipball/gh-pages
[author]
Yuta Hayashi
(function () {
var self = $('#sample3').data('carousel')
, control = $('#sample3-control')
, paginationItem = control.find($('.ui-carousel-paginationItem'))
;
paginationItem.on('click', function(e){
self.moveBind(paginationItem.index(this) * self.group);
e.preventDefault();
});
control.find($('.ui-carousel-prev')).on('click', function(e){
self.moveBind(self.index - self.group, this);
e.preventDefault();
});
control.find($('.ui-carousel-next')).on('click', function(e){
self.moveBind(self.index + self.group, this);
e.preventDefault();
});
control.find($('.ui-carousel-setNum')).on('click', function(e){
self.moveBind(2, this);
e.preventDefault();
});
})();
$('#sample4').liquidCarousel({
pos_x: 'center'
,autoPlayInterval: 2000
,autoPlayStartDelay: 0
,autoPlay: true
,autoPlayHoverStop: true
});
$('#sample4').each(function () {
var $this = $(this)
,self = $this.data('carousel')
,$showCurrentNoArea = $this.find('#sample4-showCurrentNoArea')
,$showItemLengthArea = $this.find('#sample4-showItemLengthArea')
,ltemLength = self.$item.length
;
function _init () {
$showItemLengthArea.text(ltemLength);
_setIndex();
_eventify();
}
function _setIndex () {
$showCurrentNoArea.text(self.index + 1);
}
function _eventify () {
$this.on('carousel:moveend', function(e){
_setIndex();
});
}
_init ();
});