UName10
asked on
Smooth transition needed for fade effect
I've added a fade effect to the following tabs here, but the transition isn't smooth, especially on the last 2 tabs.
I'd like it be like this page here.
Here's the Javascipt if someone could help:
I'd like it be like this page here.
Here's the Javascipt if someone could help:
$(window).load(function(){
$('.tab:not(.aboutus)').fadeOut();
$('.tabs li').click(function(){
var thisAd = $(this).parent().parent();
$(thisAd).children('.tab').fadeOut();
$(thisAd).children('.'+$(this).attr('class').replace('tab','')).fadeIn();
$('.tabs li').removeClass('active');
$(this).addClass('active');
});
newContent.hide();
currentContent.fadeOut(10, function() {
newContent.fadeIn(100);
currentContent.removeClass('current-content');
newContent.addClass('current-content');
});
if(window.location.hash) {
if (window.location.hash == "#map") {
$(".Advert").children('.tab').fadeOut();
$(".Advert").children('.map').fadeIn();
$('.tabs li').removeClass('active');
$('.maptab').addClass('active');
}
if (window.location.hash == "#voucher") {
$(".Advert").children('.tab').fadeOut();
$(".Advert").children('.vouchers').fadeIn();
}
}
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No solution
Open in new window