Difference between revisions of "MediaWiki:Common.js"

From MakeICT Wiki
Jump to navigationJump to search
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
(function () {  
+
(function () {
   console.log("test");
+
   var todos = $(".makeict-todo");
   console.log($(".makeict-todo"));
+
   var todoContainer = $("#makeict-decision-summary");
 +
  for(var i=0; i<todos.length; i++){
 +
    todoContainer.appendChild(todos.cloneNode(true));
 +
  }
 +
 
 
}());
 
}());
 +
/*
 +
  var todos = $(".makeict-todo");
 +
  var todoContainer = $("#makeict-decision-summary");
 +
*/

Revision as of 11:41, 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");
  for(var i=0; i<todos.length; i++){
    todoContainer.appendChild(todos.cloneNode(true));
  }

}());
/*
  var todos = $(".makeict-todo");
  var todoContainer = $("#makeict-decision-summary");
*/