$( document ).ready(function() { $(".slides").children().attr("style","display:block"); $( "#ver_tb1" ).click(function() { $("#tabs2").attr("style","display:hidden;visibility:hidden;height: 0"); $("#tabs1").attr("style",""); }); $( "#ver_tb2" ).click(function() { $("#tabs1").attr("style","display:hidden;visibility:hidden;height: 0;"); $("#tabs2").attr("style",""); }); });