kswedberg / jquery-carousel-lite

A jQuery carousel plugin based on jCarouselLite by Ganeshji Marwaha
MIT License
177 stars 59 forks source link

I've added some functionality to the plugin #20

Closed deptofjeffayer closed 12 years ago

deptofjeffayer commented 12 years ago

Changes and new features:

activeClass

The activeClass value is automatically added to the active slides class. This allows customized animations within the beforeStart and beforeEnd callback options.

first, last : Function - callbacks

When the circular option is set to false you have the option of doing something once the first or last slide has been reached via callbacks.

example

$('div.carousel').jCarouselLite({
  btnNext: '.next',
  btnPrev: '.prev',
  first: function() {
    alert('This is the first slide');
  },
  last: function() {
    alert('This is the last slide');
  }
});

I've also removed the automatic overflow:hidden on the div element as I feel that should be managed through CSS. I find myself constantly removing it from the plugin so why not try and cut out the middle man.

All changes have been documented within the readme. As this is my first pull request, let me know if there is anything I should have done differently.

Thanks,

Jeff

kswedberg commented 12 years ago

thanks a lot for the pull request! good additions!