Difference between revisions of "MediaWiki:Common.js"

From MakeICT Wiki
Jump to navigationJump to search
Line 3: Line 3:
 
   var todos = $(".makeict-todo");
 
   var todos = $(".makeict-todo");
 
   var todoContainer = $("#makeict-decision-summary");
 
   var todoContainer = $("#makeict-decision-summary");
 +
  console.log(todoContainer);
 
   for(var i=0; i<todos.length; i++){
 
   for(var i=0; i<todos.length; i++){
     console.log(todos[i]);
+
    var clone = todos[i].cloneNode(true);
     todoContainer.appendChild(todos[i].cloneNode(true));
+
     console.log(clone);
 +
     todoContainer.appendChild(clone);
 
   }
 
   }
  

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

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