Skip to content

Instantly share code, notes, and snippets.

@juarezpaf
Created July 11, 2011 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juarezpaf/1076837 to your computer and use it in GitHub Desktop.
Save juarezpaf/1076837 to your computer and use it in GitHub Desktop.
jQuery(function($) {
/*Simple Tabs*/
//When page loads...
$(".tab_container > div").hide();
$("ul.tabs li:first").addClass("selected").show();
$(".tab_container > div:first").show();
//On Click Event
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("selected");
$(this).addClass("selected");
$(".tab_container > div").hide();
var activeTab = $(this).find("a").attr("href");
$(activeTab).fadeIn();
return false;
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment