Board Thread:Support Requests - Getting Technical/@comment-3271569-20131223152502

I'm currently working on an add class table tab system for w:c:dragoncity:Eggs. I managed to code an raw sample for it. And I was wondering if you have some suggestions how I could improve it.

JS
") var countEggs = $('table#unbreedable-exclusive_hybrid tr.exclusive_terra').length; for ( var i = 1; i < countEggs / 4; i++ ) { $("table#unbreedable-exclusive_hybrid-terra tr").append(" ") } $('.tab-exclusive-hybrid-terra-0').click(function{  $('table#unbreedable-exclusive_hybrid-terra td').removeClass('active');   $('.tab-exclusive-hybrid-terra-0').addClass('active');   $('tr.exclusive_terra').removeClass('active');   $('tr.exclusive_terra.content-0').addClass('active'); }); $('.tab-exclusive-hybrid-terra-1').click(function{   $('table#unbreedable-exclusive_hybrid-terra td').removeClass('active');   $('.tab-exclusive-hybrid-terra-1').addClass('active');   $('tr.exclusive_terra').removeClass('active');   $('tr.exclusive_terra.content-1').addClass('active'); }); $('.tab-exclusive-hybrid-terra-2').click(function{   $('table#unbreedable-exclusive_hybrid-terra td').removeClass('active'); $('.tab-exclusive-hybrid-terra-2').addClass('active'); $('tr.exclusive_terra').removeClass('active'); $('tr.exclusive_terra.content-2').addClass('active'); }); $('.tab-exclusive-hybrid-terra-3').click(function{ $('table#unbreedable-exclusive_hybrid-terra td').removeClass('active'); $('.tab-exclusive-hybrid-terra-3').addClass('active'); $('tr.exclusive_terra').removeClass('active'); $('tr.exclusive_terra.content-3').addClass('active'); }); $('.tab-exclusive-hybrid-terra-4').click(function{ $('table#unbreedable-exclusive_hybrid-terra td').removeClass('active'); $('.tab-exclusive-hybrid-terra-4').addClass('active'); $('tr.exclusive_terra').removeClass('active'); $('tr.exclusive_terra.content-4').addClass('active'); }); });

CSS
 