Mercurial > repos > davidvanzessen > complete_immunerepertoire_igg
comparison script.js @ 1:778a9d130904 draft
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 04 Sep 2014 07:46:23 -0400 |
parents | 7d97fa9a0423 |
children |
comparison
equal
deleted
inserted
replaced
0:7d97fa9a0423 | 1:778a9d130904 |
---|---|
1 function compareAdd(id){ | 1 function compareAdd(id){ |
2 var img = document.createElement('img'); | 2 var img = document.createElement('img'); |
3 img.setAttribute('src', 'VD_' + id + '.png'); | 3 img.setAttribute('src', 'HeatmapVD_' + id + '.png'); |
4 var td = document.createElement('td'); | 4 var td = document.createElement('td'); |
5 td.setAttribute('id', "comparison_vd_" + id); | 5 td.setAttribute('id', "comparison_vd_" + id); |
6 td.appendChild(img) | 6 td.appendChild(img) |
7 document.getElementById('comparison_table_vd').appendChild(td); | 7 $('#comparison_table_vd').append(td); |
8 | 8 |
9 img = document.createElement('img'); | 9 img = document.createElement('img'); |
10 img.setAttribute('src', 'VJ_' + id + '.png'); | 10 img.setAttribute('src', 'HeatmapVJ_' + id + '.png'); |
11 td = document.createElement('td'); | 11 td = document.createElement('td'); |
12 td.setAttribute('id', "comparison_vj_" + id); | 12 td.setAttribute('id', "comparison_vj_" + id); |
13 td.appendChild(img) | 13 td.appendChild(img) |
14 document.getElementById('comparison_table_vj').appendChild(td); | 14 $('#comparison_table_vj').append(td); |
15 | 15 |
16 img = document.createElement('img'); | 16 img = document.createElement('img'); |
17 img.setAttribute('src', 'DJ_' + id + '.png'); | 17 img.setAttribute('src', 'HeatmapDJ_' + id + '.png'); |
18 td = document.createElement('td'); | 18 td = document.createElement('td'); |
19 td.setAttribute('id', "comparison_dj_" + id); | 19 td.setAttribute('id', "comparison_dj_" + id); |
20 td.appendChild(img) | 20 td.appendChild(img) |
21 document.getElementById('comparison_table_dj').appendChild(td); | 21 $('#comparison_table_dj').append(td); |
22 | 22 |
23 document.getElementById('compare_checkbox_' + id).setAttribute('onchange', "javascript:compareRemove('" + id + "')"); | 23 $('#compare_checkbox_' + id).attr('onchange', "javascript:compareRemove('" + id + "')"); |
24 } | 24 } |
25 | 25 |
26 | 26 |
27 function compareRemove(id){ | 27 function compareRemove(id){ |
28 document.getElementById("comparison_vd_" + id).remove() | 28 $("#comparison_vd_" + id).remove() |
29 document.getElementById("comparison_vj_" + id).remove() | 29 $("#comparison_vj_" + id).remove() |
30 document.getElementById("comparison_dj_" + id).remove() | 30 $("#comparison_dj_" + id).remove() |
31 document.getElementById('compare_checkbox_' + id).setAttribute('onchange', "javascript:compareAdd('" + id + "')"); | 31 $("#compare_checkbox_" + id).attr('onchange', "javascript:compareAdd('" + id + "')"); |
32 } | 32 } |
33 | |
34 $( document ).ready(function () { | |
35 $('#junction_table').tablesorter(); | |
36 }) |