diff script.js @ 2:fd1b76816395 draft

Uploaded
author davidvanzessen
date Thu, 27 Mar 2014 10:54:03 -0400
parents 1ba88ffd6f4e
children
line wrap: on
line diff
--- a/script.js	Tue Mar 11 11:13:33 2014 -0400
+++ b/script.js	Thu Mar 27 10:54:03 2014 -0400
@@ -1,32 +1,36 @@
 function compareAdd(id){
 	var img = document.createElement('img');
-	img.setAttribute('src', 'VD_' + id + '.png');
+	img.setAttribute('src', 'HeatmapVD_' + id + '.png');
 	var td = document.createElement('td');
 	td.setAttribute('id', "comparison_vd_" + id);
 	td.appendChild(img)
-	document.getElementById('comparison_table_vd').appendChild(td);
+	$('#comparison_table_vd').append(td);
 	
 	img = document.createElement('img');
-	img.setAttribute('src', 'VJ_' + id + '.png');
+	img.setAttribute('src', 'HeatmapVJ_' + id + '.png');
 	td = document.createElement('td');
 	td.setAttribute('id', "comparison_vj_" + id);
 	td.appendChild(img)
-	document.getElementById('comparison_table_vj').appendChild(td);
+	$('#comparison_table_vj').append(td);
 	
 	img = document.createElement('img');
-	img.setAttribute('src', 'DJ_' + id + '.png');
+	img.setAttribute('src', 'HeatmapDJ_' + id + '.png');
 	td = document.createElement('td');
 	td.setAttribute('id', "comparison_dj_" + id);
 	td.appendChild(img)
-	document.getElementById('comparison_table_dj').appendChild(td);
+	$('#comparison_table_dj').append(td);
 	
-	document.getElementById('compare_checkbox_' + id).setAttribute('onchange', "javascript:compareRemove('" + id + "')");
+	$('#compare_checkbox_' + id).attr('onchange', "javascript:compareRemove('" + id + "')");
 }
 
 
 function compareRemove(id){
-	document.getElementById("comparison_vd_" + id).remove()
-	document.getElementById("comparison_vj_" + id).remove()
-	document.getElementById("comparison_dj_" + id).remove()
-	document.getElementById('compare_checkbox_' + id).setAttribute('onchange', "javascript:compareAdd('" + id + "')");
+	$("#comparison_vd_" + id).remove()
+	$("#comparison_vj_" + id).remove()
+	$("#comparison_dj_" + id).remove()
+	$("#compare_checkbox_" + id).attr('onchange', "javascript:compareAdd('" + id + "')");
 }
+
+$( document ).ready(function () {
+	$('#junction_table').tablesorter();
+})