I\'m trying to create a script to cycle through DIVs (one at a time) that have the same class name. .nextAll() and all that fun stuff is completely foreign to m
(function(){
var $hints = $('.hint');
var $hintDescriptions = $('.hint-description');
var i = 0;
$('.next-hint').on('click', function(){
i = (i + 1) % $hints.length;
$hints.hide().eq(i).show();
$hintDescriptions.hide().eq(i).show();
});
})();