Team:UNITN-Trento/Templates/Notebook

From 2013.igem.org

(Difference between revisions)
Line 10: Line 10:
$(document).ready(function() {
$(document).ready(function() {
 +
 +
last_id = 0;
//Get posts from ajax index
//Get posts from ajax index
$("#aj_index a").each(function() {
$("#aj_index a").each(function() {
-
id = $(this).attr('href').split("/");
+
href = $(this).attr('href');
 +
id = href.split("/");
id = id[id.length - 1];
id = id[id.length - 1];
alert(id);
alert(id);
 +
 +
//Save highest id (last post)
 +
if( id > last_id ) {
 +
last_id = id;
 +
}
 +
 +
//Add 'add post' button
 +
$("<a>Add new LabPost_AJ</a>").attr( 'href' , href ).addClass("tn-addpost").appendTo("#aj_cont");
});
});

Revision as of 07:04, 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