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 7529461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:40:03+00:00 2026-05-30T04:40:03+00:00

I have made this script $(document).ready(function(){ $(div#tabs a).hover(function(){ rod = this.id $(‘div.tabber’).hide(); $(‘#tabber_’ +

  • 0

I have made this script

$(document).ready(function(){
    $("div#tabs a").hover(function(){
        rod = this.id
        $('div.tabber').hide();
        $('#tabber_' + rod).fadeIn();
        $("div#tabs a").removeClass("tab_active");
        $(this).addClass("tab_active");
    });
});

and the html:

<div id="tabs"> <!-- begin #tabs -->
        <!-- begin #tab1 --><a id="tab1" class="tab_active">What are you?</a> <!-- end #tab2 -->
        <!-- begin #tab2 --><a id="tab2">Products</a> <!-- end #tab2 -->
        <!-- begin #tab3 --><a id="tab3">Services</a> <!-- end #tab3 -->
        <!-- begin #tab4 --><a id="tab4">Contact Us</a> <!-- end #tab4 -->
      </div> <!-- end #tabs -->

<div id="tabs_tabber"> <!-- begin #tabs_tabber -->
            <div class="tabber" id="tabber_tab1"> <!-- begin #tabber_tab1 -->
                <a id="m_btn1" href="#">business</a><br />
                <a id="m_btn" href="#">private</a><br />
            </div><!-- end #tabber_tab1 -->
            <div class="tabber" id="tabber_tab2" style="display:none;"> <!-- begin #tabber_tab2 -->
                <a id="m_btn1" href="#">Apple</a><br />
                <a id="m_btn" href="#">Microsoft</a><br />

            </div> <!-- end #tabber_tab2 -->
            <div class="tabber" id="tabber_tab3" style="display:none;"> <!-- begin #tabber_tab3 -->
                <a id="m_btn1" href="#">Education</a><br />
                <a id="m_btn" href="#">Installation</a><br />
            </div> <!-- end #tabber_tab3 -->
            <div class="tabber" id="tabber_tab4" style="display:none;"> <!-- begin #tabber_tab4 -->
                <a id="m_btn1" href="#">Menu Btn</a><br />
                <a id="m_btn" href="#">Menu Btn</a><br />
                <a id="m_btn" href="#">Menu Btn</a><br />
            </div> <!-- end #tabber_tab4 -->
        </div> <!-- end #tabs_tabber -->

I have noticed, that if I do the .fadeIn effect there will be a problem. If the client is ‘hover’ a tab and then directly hover another tab, the function will not work because it is not done before the other tab requires the same function again, which will result in totally “not-good-looking” fading menu.

It is difficult to explain because of my bad english, but if someone please could try just look at it and perhaps telling me if there is some way to end the function before it will be requested again.

I also know that I can do the .click function instead of .hover function, but I rather want the .hover

  • 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-05-30T04:40:04+00:00Added an answer on May 30, 2026 at 4:40 am

    You can change $('#tabber_' + rod).fadeIn(); to:

    $('#tabber_' + rod).stop().fadeTo(250, 1);
    

    The .stop() will stop any current animations on the element(s) which is useful if you want to queue-up another animation. Also I changed .fadeOut() to .fadeTo() because when you use .stop(), if you stop the animation half of the way though it will get stuck half-transparent.

    Here is a demo: http://jsfiddle.net/4vLty/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a working script like this: jQuery(document).ready(function(){ $('.video-thumb img').bind('mouseover',function(){ var new = $(this).attr('src').replace(/default.jpg/,'1.jpg');
I have this: <script> $(document).ready(function() { $(a#a_test).fancybox({ titleShow : false, width: 400, height: 120,
Hi have made this function which is made to replicate an error that I
I have this simple script: function orientation() { var orientation = window.orientation; switch(orientation) {
My code is as follows: <script> $(document).ready(function() { var tagCounter=0; $(#tag-add-button).click(function () { var
<html> <head> <script type=text/javascript src=jquery.js></script> <script type=text/javascript> $(document).ready(function(){ $(.region).load('getRecords.php?start=regions'); }); </script> </head> <body> <select>
OK, I was just fooling around in my spare time and have made this
I have made some progress with the DataList and UserControl this morning but I
Hi I made this site a while ago in my table days but have
This is a C++ class that I have made with n number of pointers.

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.