I am referring to one of the SOF answers for sorting the alphabets in second column using javascript, here is the example http://jsfiddle.net/mLYch/159/ .
In JS side it has getElementById and calling HTML tag with id
 <table id="caltbl">
 var tbl = document.getElementById("caltbl").tBodies[0];
I tried the same with the class and it doesn't work.
 <table class="caltbl">
 var tbl = document.getElementsByClass('caltbl').tBodies[0];
Can someone please assist on how to use make the script run without ID ?
 
     
    