function showBox(boxname) { $(".hidable").each(function (index) { if ($(this).attr("id") == boxname) { $(this).slideToggle(); } }); }