1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- jQuery(document).ready(function($) {
- console.log("Hello Les notices");
-
-
-
-
- $('.story-page-2 h2, .story-page:not(.story-page-0):not(.story-page-1):not(.story-page-2) h1').each(function(index, el) {
-
- var chars = $(this).text().split("");
-
- var typotized = "";
- var k = 0;
- for (var j = 0; j < chars.length; j++) {
-
- if(! /\s/.test(chars[j]) ){
- k++;
- if ( k % 12 == 0){
- typotized += '<span class="typo-4">'+chars[j]+'</span>';
- continue;
- }
- if ( k % 9 == 0){
- typotized += '<span class="typo-3">'+chars[j]+'</span>';
- continue;
- }
- if ( k % 6 == 0){
- typotized += '<span class="typo-2">'+chars[j]+'</span>';
- continue;
- }
- if ( k % 3 == 0){
- typotized += '<span class="typo-1">'+chars[j]+'</span>';
- continue;
- }
- }
- typotized += chars[j];
- }
- $(this).html(typotized);
- });
- });
|