Creating simple tabs with jQuery
$(function () { var tabContainers = $('div.tabs > div'); tabContainers.hide().filter(':first').show(); $('div.tabs ul.nav a').click(function () { tabContainers.hide(); tabContainers.filter(this.hash).show(); $('div.tabs ul.nav li').removeClass('selected'); $(this).parent().addClass('selected'); return false; }).filter(':first').click(); });