Skip to content

Instantly share code, notes, and snippets.

@agatkamazur
Created August 27, 2011 13:00
Show Gist options
  • Save agatkamazur/1175361 to your computer and use it in GitHub Desktop.
Save agatkamazur/1175361 to your computer and use it in GitHub Desktop.
Zmien Stan
zmienStan: function( ) {
this.usunKlase();
return this.each( function(){
var el = $(this);
var indeksStanu = el.data('indeksStanu') || 0
indeksStanu = (indeksStanu + 1) % jQuery.fn.stany.length
el.data('indeksStanu', indeksStanu)
.addClass(jQuery.fn.stany[indeksStanu]);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment