Skip to content

Instantly share code, notes, and snippets.

@mcdemidov
Last active August 29, 2015 14:25
Show Gist options
  • Save mcdemidov/479ee4966903b7b39ae7 to your computer and use it in GitHub Desktop.
Save mcdemidov/479ee4966903b7b39ae7 to your computer and use it in GitHub Desktop.
change class
var i = -1, bghead = ["bg", "bg1", "bg2", "bg3", "bg4", "bg5"] ;
$(".butt-next").click(function () {
$("header").removeClass(bghead[i % bghead.length])
$("header").addClass(bghead[++i% bghead.length])
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment