Team:UCL London/Week 7

From 2010.igem.org

Revision as of 22:17, 20 August 2010 by Zcbee12 (Talk | contribs)

mod(".class",4000,"add");

function mod(id,value,type){

   var numb = $(id).html();
   var current_value = parseInt(numb);
   do {
       if(type == "add")
           increment(id);
       else
           decrement(id);
       current_value = parseInt(numb);
   }while(current_value != value);
   function decrement(id){
       $(id).html(current_value-1);
   }
   function increment(id){
       $(id).html(current_value+1);
   }

}