You are doing the same loop over an over, nothing change try this:
jQuery("#tbl1_1").hide();
jQuery("#tbl1_1_1").hide();
jQuery("#tbl1_1_1_a").hide();
jQuery("#tbl2_1").hide();
jQuery(this).click(function()
{
if($("#tbl1_1_1").is(":visible"))
{
jQuery("#tbl1_1_1").hide();
jQuery("#tbl1_1_1_a").show();
}
if($("#tbl1_1").is(":visible"))
{
jQuery("#tbl1_1").hide();
jQuery("#tbl1_1_1").show();
}
if($("#tbl1").is(":visible"))
{
jQuery("#tbl1").hide();
jQuery("#tbl1_1").show();
}
console.log("Ajunge aici.");
});
This lines are now under a condition and not execute always.
jQuery("#tbl1").hide();
jQuery("#tbl1_1").show();
Without the condition, these sentences were getting executed on every click, and you enter on an infinite loop.