Difference between revisions of "MediaWiki:Common.js"
From MakeICT Wiki
Jump to navigationJump to searchLine 5: | Line 5: | ||
console.log(todoContainer); | console.log(todoContainer); | ||
for(var i=0; i<todos.length; i++){ | for(var i=0; i<todos.length; i++){ | ||
− | var | + | var listItem = document.createElement("li"); |
− | + | listItem.appendChild(todos[i].cloneNode(true)); | |
− | todoContainer.appendChild( | + | todoContainer.appendChild(listItem); |
} | } | ||
Revision as of 11:48, 8 March 2015
/* Any JavaScript here will be loaded for all users on every page load. */
(function () {
var todos = $(".makeict-todo");
var todoContainer = $("#makeict-decision-summary")[0];
console.log(todoContainer);
for(var i=0; i<todos.length; i++){
var listItem = document.createElement("li");
listItem.appendChild(todos[i].cloneNode(true));
todoContainer.appendChild(listItem);
}
}());
/*
var todos = $(".makeict-todo");
var todoContainer = $("#makeict-decision-summary");
*/