825
edits
No edit summary |
No edit summary |
||
Line 90: | Line 90: | ||
}); | }); | ||
$( function(){ | $( function(){ | ||
Line 97: | Line 98: | ||
if( countPoem2.length > 0 ){ | if( countPoem2.length > 0 ){ | ||
for (let j = 0; j < countPoem2.length; j++) { | |||
var poemElement = $(".Poem2-Ekatra").eq(j); | |||
if( poemElement.length ){ | |||
var poemText = poemElement.html(); | |||
var poemArray = poemText.split("\n"); | |||
poemElement.text(""); | |||
// First measure | |||
poemArray.forEach(appendIndent); | |||
// Second measure | |||
poemElement.children('p').each(appendCssIndent); | |||
} | |||
} | |||
} | |||
function appendIndent(i){ | |||
poemElement.append( '<p style="text-indent: 2em;">' + i + '</p>' ); | |||
} | } | ||
function appendCssIndent(i){ | |||
$(this).css('text-indent', '2em'); | |||
} | } | ||
}); | }); |