Closed rvpatel closed 9 years ago
var jcarousel1 = $('.jcarousel1');
jcarousel1.on('jcarousel:targetin', 'li', function() {
$( ".jcarousel1 li" ).eq($(this).index() + 2).addClass('last');
$(this).addClass('first');
});
jcarousel1.on('jcarousel:targetout', 'li', function() {
$(this).removeClass('first');
$( ".jcarousel1 li" ).eq($(this).index()+ 2).removeClass('last');
});
Use the firstin
, firstout
, lastin
and lastout
events, see http://sorgalla.com/jcarousel/docs/reference/events.html#firstin
I have display 3 item on slide scroll on by on i want class visible item list on add class first and last. How to fix i have add class first .
How to add class last ?