$('.search-tab__tabs li:first-child').addClass('active');
$('.search-tab__content').hide();
$('.search-tab__content:first').show();
$('.search-tab__tabs li').click(function () {
$('.search-tab__tabs li').removeClass('active');
$(this).addClass('active');
$('.search-tab__content').hide();
var activeTab = $(this).find('a').attr('href');
$(activeTab).fadeIn(700);
return false;
});
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter