enmi12/glossaire/_includes/random-sizes.js
author ymh <ymh.work@gmail.com>
Mon, 14 Oct 2019 17:39:30 +0200
changeset 7 cf61fcea0001
parent 0 d970ebf37754
permissions -rwxr-xr-x
resynchronize code repo with production
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
      // add randomish size classes
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
      $container.find('.element').each(function(){
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
        var $this = $(this),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
            number = parseInt( $this.find('.number').text(), 10 );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
        if ( number % 7 % 2 === 1 ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
          $this.addClass('width2');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
        }
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
        if ( number % 3 === 0 ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
          $this.addClass('height2');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
        }
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
      });