cycle snippets

jQuery cycle plugin

Tagged jquery, cycle  Languages javascript
(function($){  
  $.fn.cycle = function() {
    $(this).each(function(index) {
      var cls = index % 2 ? 'even':'odd';
      $(this).attr('class', cls);
    });
  }
})(jQuery);