×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: user386d9
Added: Apr 11, 2017 1:54 PM
Modified: Apr 11, 2017 1:56 PM
Views: 5
Tags: no tags
  1. function group(what, items) {
  2.     $.each($(what), function (index, value) {
  3.         $(this).addClass('group' + g);
  4.         if ((index + 1) % items == 0) {
  5.             g++;
  6.         }
  7.     });
  8. }