Difference between revisions of "Team:Purdue/Navpage"

Line 17: Line 17:
 
Main();
 
Main();
  
function createLinkTag(obj,index){
 
obj.Url_name.sort();
 
obj.Url_name.forEach(function(objec,index) {
 
var temp = objec.split(",",1)
 
var as =  document.createElement("a");
 
as.href=temp[1];
 
as.innerHTML=temp[0];
 
obj.a.push(as)
 
});
 
}
 
  
  
Line 54: Line 44:
  
 
function arrayToList(){
 
function arrayToList(){
  entryBlocks.forEach(createLinkTag(obj,index));
+
var obj;
 +
  for (obj in entryBlocks){
 +
obj.Url_name.sort();
 +
var subObj;
 +
for (subObj in obj.Url_name){
 +
 
 +
var temp = subObj.split(",",1);
 +
var as =  document.createElement("a");
 +
as.href=temp[1];
 +
as.innerHTML=temp[0];
 +
obj.a.push(as);
 +
}
 +
}
 
}
 
}
  

Revision as of 14:10, 13 June 2018

Bootstrap Example