Created
October 5, 2012 14:43
-
-
Save nhunzaker/3840202 to your computer and use it in GitHub Desktop.
Set grid items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set_grid ($items) { | |
$items.removeClass("omega").each(function() { | |
var slot = $(this).index() + 1; | |
if ( slot % 3 === 0) { | |
$(this).addClass("omega"); | |
} | |
}); | |
} | |
set_grid( $(".product-list-item") ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment