24 lines
507 B
JavaScript
24 lines
507 B
JavaScript
|
|
var TablejExpand = function () {
|
||
|
|
|
||
|
|
return {
|
||
|
|
|
||
|
|
//main function to initiate the module
|
||
|
|
init: function () {
|
||
|
|
|
||
|
|
$(document).ready(function(){
|
||
|
|
$("#report tr:odd").addClass("odd");
|
||
|
|
$("#report tr:not(.odd)").hide();
|
||
|
|
$("#report tr:first-child").show();
|
||
|
|
|
||
|
|
$("#report tr.odd").click(function(){
|
||
|
|
$(this).next("tr").toggle();
|
||
|
|
$(this).find(".arrow").toggleClass("up");
|
||
|
|
});
|
||
|
|
//$("#report").jExpand();
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
}();
|