Reputation: 70406
I am working on a tabbed navigation, here is an example . For now the contens slidesUp/Down but I want it just to disappear/appear. Any Ideas?
// When the document loads do everything inside here ...
$(document).ready(function(){
// When a link is clicked
$("a.tab").click(function () {
// switch all tabs off
$(".active").removeClass("active");
// switch this tab on
$(this).addClass("active");
// slide all content up
$(".content").slideUp();
// slide this content up
var content_show = $(this).attr("title");
$("#"+content_show).slideDown();
});
});
Upvotes: 1
Views: 138
Reputation: 187020
Replace
$(".content").slideUp();
with
$(".content").hide();
and
$("#"+content_show).slideDown();
with
$("#"+content_show).show();
Upvotes: 8