Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8528619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:50:35+00:00 2026-06-11T08:50:35+00:00

I”m using this library in my project : jQuery Tools Tabs , and from

  • 0

I”m using this library in my project : jQuery Tools Tabs, and from what I’ve read I can make my custom effect instead of having the default one.

I decided to have an effect like this one : Demo . And I found something that could be similar, but I’m having trouble implementing it.

$.tools.tabs.addEffect("subFade", function(tabIndex, done) {
    var conf = this.getConf(),
        speed = conf.fadeOutSpeed,
        panes = this.getPanes();
    var $tab = this.getCurrentTab();

    if($tab.hasClass("current")){//Going AWAY from the tab, do hide animation (before the tab is hidden)
        $(".tabs-tab").animate({"left" : "0px"}, 300, function(){//I was sliding it behind the tabs when not in use, replace with your own animation
            panes.hide();
            panes.eq(tabIndex).fadeIn(200, done);
            console.log("Done done");
            //This is then end of the chain - my animation, hide all then fade in new tab.
        });
    } else {//going away from any other tab
        panes.hide();
        panes.eq(tabIndex).fadeIn(200, done);
    }

    $tab = this.getTabs().eq(tabIndex);

    if($tab.hasClass("current")){//Going to my special tab.
        $(".tabs-tab").animate({"left" : "-160px"}, 300);//Sliding it out
    }
    // the supplied callback must be called after the effect has finished its job
    done.call();
});

The above is what I have been trying but without success. So I was wondering if someone knows what I’m doing wrong and how can I make that custom effect behave like the demo ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:50:36+00:00Added an answer on June 11, 2026 at 8:50 am

    I have made a content slider similar to your example (however it does Not have FadeIn/Out functionality), but maybe with some modification of my code you can make that effect.
    Fiddle here

    My full code:

    $(document).ready(function() {
    
    $('.slides div:not(:first)').hide();
    $('.slides div:first').addClass('active');
    //Put .active width in var 
    var activeWidth = $(".active").outerWidth();
    
    $('.control p:first').addClass('current');
    $('.control p').click(function() {  
    /*store P index inside var*/    
    var Pindex = $(this).index(); 
    /* Store the slides in var*/
    var slidePosition=$('.wrapper .slides div');
    /* check if ACTIVE slide has GREATER index than clicked P TAG (CONTROLS)*/
    if($(".wrapper .slides div.active").index() > $('.wrapper .slides div').eq(Pindex).index()) {
    /*Show the slide equal to clicked P-TAG(CONTROLS)*/
    slidePosition.eq(Pindex).show();
    /*Add class "current" to the clicked control*/
     $(this).addClass('current').prevAll('.current').removeClass('current');
     $(this).nextAll('.current').removeClass('current');    
     $(".active").removeClass("active");
     $(".slides").css({"margin-left":-activeWidth});
     /*Start animation...*/
     $(".slides").animate({marginLeft:activeWidth-activeWidth},1000,function() {     
     slidePosition.eq(Pindex).addClass("active");
     $(".slides").css({"margin-left":"0px"});
     $(".active").prevAll().hide();
     $(".active").nextAll().hide();
     });
    }
    
    if($('.slides').is(':animated')) {   
       return false;
    }   
    
    if($(this).is($(".current"))) {   
       return false;
    }
    
    
    if($(".wrapper .slides div.active").index() < $('.wrapper .slides div').eq(Pindex).index()) {
     slidePosition.eq(Pindex).show();
     $(this).addClass('current').prevAll('.current').removeClass('current');
     $(this).nextAll('.current').removeClass('current');    
     $(".active").removeClass("active");
    
        $(".slides").animate({marginLeft:-activeWidth},1000,function() {     
         slidePosition.eq(Pindex).addClass("active");
         $(".slides").css({"margin-left":"0px"});
         $(".active").prevAll().hide();
         $(".active").nextAll().hide();
        });
    }
    
        });
    $(".left").click(function() {      
     if($('.slides').is(':animated')) {   
       return false;
     }      
    if($(".active").prev().length===0) {     
     //alert("no prev");
     $(".active").nextAll().clone().insertBefore(".active");
     $(".active").removeClass("active").prev().addClass("active");
     $(".active").show();
     $(".slides").css({"margin-left":-activeWidth});
        $(".slides").animate({marginLeft:activeWidth-activeWidth},1000,function() {           
         $(".active").next().insertBefore($(".slides div:first")).hide();
         var activeIndex = $(".active").index();
         $(".active").nextAll().remove();
         $(".current").removeClass("current");          
         //alert(activeIndex)
         $(".control p").eq(activeIndex).addClass("current");
        });         
    }
    else{
    
         $(".active").removeClass("active").prev().addClass("active");
         $(".active").show();
         $(".slides").css({"margin-left":-activeWidth});
            $(".slides").animate({marginLeft:activeWidth-activeWidth},1000,function() {  
             var activeIndex = $(".active").index();                
             $(".active").prevAll().hide();
             $(".active").nextAll().hide();
             $(".current").removeClass("current");           
             $(".control p").eq(activeIndex).addClass("current");
            }); 
        }       
    }); 
    
    $(".right").click(function() {    
      if($('.slides').is(':animated')) {   
       return false;
      }   
        if($(".active").next().length===0) {
          //alert("no next")       
         $(".slides div:first").nextAll(':not(.active)').clone().insertAfter(".active");
         $(".slides div:first").insertAfter(".active");
         $(".active").removeClass("active").next().addClass("active");
         $(".active").show();
         $(".slides").animate({marginLeft:-activeWidth},1000,function() {        
            $(".active").prev().hide().insertAfter(".slides div:last");
            $(".slides").css({"margin-left":"0px"});
            $(".active").prevAll().remove();
             $(".current").removeClass("current");
             var activeIndex = $(".active").index();    
             $(".control p").eq(activeIndex).addClass("current");
            });        
        }
        else{
         $(".active").removeClass("active").next().addClass("active");
          $(".active").show();        
            $(".slides").animate({marginLeft:-activeWidth},1000,function() {         
             $(".slides").css({"margin-left":"0px"});
             $(".active").prevAll().hide();
             $(".active").nextAll().hide();
             $(".current").removeClass("current");
             var activeIndex = $(".active").index();    
             $(".control p").eq(activeIndex).addClass("current");
    
            }); 
    
        }
    });
    
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I'm using this code to make #sidebar 's height match #post_content 's height: <script
This is in Visual Studio 2010 IDE. I need to remove the quotes from
I am using custom code to print the comments but the problem is whatever
I'm using Socket.IO on Node.js. The Example here: http://socket.io/#how-to-use First Example. I have tested
here i'm trying to execute a code found with google for capturing video from
I have a custom converter to select a Country in a SelectOneMenu component: File:
I want to change all headers, normally this is quite easy (and it probably
I've set up a custom Facebook share button for a website. When I click
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.