MediaWiki:Common.js: Difference between revisions

From Ekatra Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
$( function(){
$( function(){
var poemElement = $(".Poem2-Ekatra");
var poemElement = $(".Poem2-Ekatra");
var poemText = poemElement.text();
var poemText = poemElement.html();
var poemArray = poemText.split("\n");
var poemArray = poemText.split("\n");

Revision as of 05:47, 15 May 2021

$( function(){
	var poemElement = $(".Poem2-Ekatra");
	var poemText = poemElement.html();
	var poemArray = poemText.split("\n");
	
	poemElement.text("");

	poemArray.forEach( function(i) {
		poemElement.append( '<p style="text-indent: 3em;">' + i + '</p>' );
	});
});