0db6c823a2cd66fdfd97b80c69577d69a634eac3 larrym Wed Nov 2 20:27:11 2011 -0700 replace some instances of $(#...) with document.getElementById diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 709a66a..8918fe2 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -62,37 +62,38 @@ } } } imageV2.inPlaceUpdate = hgTracks.inPlaceUpdate && imageV2.mapIsUpdateable; } } ///////////////////////////////////// ////////// Genomic position ///////// ///////////////////////////////////// var genomePos = { original: null, originalSize: 0, - linkFixup: function (pos, name, reg, endParamName) + linkFixup: function (pos, id, reg, endParamName) { // fixup external links (e.g. ensembl) - if($('#' + name).length) { - var link = $('#' + name).attr('href'); + var ele = $(document.getElementById(id)); + if(ele.length) { + var link = ele.attr('href'); var a = reg.exec(link); if(a && a[1]) { - $('#' + name).attr('href', a[1] + pos.start + "&" + endParamName + "=" + pos.end); + ele.attr('href', a[1] + pos.start + "&" + endParamName + "=" + pos.end); } } }, setByCoordinates: function (chrom, start, end) { var newPosition = chrom + ":" + commify(start) + "-" + commify(end); genomePos.set(newPosition, commify(end - start + 1)); return newPosition; }, getElement: function () { // Return position box object var tags = document.getElementsByName("position");