Team:UNITN-Trento/Templates/Notebook

From 2013.igem.org

(Difference between revisions)
Line 15: Line 15:
//Get posts from ajax index
//Get posts from ajax index
$("#aj_index a").each(function() {
$("#aj_index a").each(function() {
 +
 +
//Get url
href = $(this).attr('href');
href = $(this).attr('href');
 +
 +
//Get id
id = href.split("/");
id = href.split("/");
id = id[id.length - 1];
id = id[id.length - 1];
Line 26: Line 30:
//Add 'add post' button
//Add 'add post' button
-
$("<a>Add new LabPost_AJ</a>").attr( 'href' , href ).addClass("tn-addpost").appendTo("#aj_cont");
+
addpost_url = href.split("/");
 +
addpost_url.pop();
 +
addpost_url.join("/");
 +
addpost_url += "?action=raw&ctype=text/javascript";
 +
$("<a>Add new LabPost_AJ</a>").attr( 'href' , addpost_url ).addClass("tn-addpost").appendTo("#aj_cont");
});
});

Revision as of 07:08, 19 August 2013

Filter by DATE
 
Sun Mon Tue Wed Thu Fri Sat
             
             
             
             
             
             
{{{1}}}
Filter by WHO
Filter by TAG
[http://2013.igem.org/wiki/index.php?title=Team:UNITN-Trento/Templates/Notebook&action=edit Edit this page] | Main Page