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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:46:37+00:00 2026-06-01T10:46:37+00:00

Here is the html: <div id=wrapper> <ul class=tabs> <li class=active><a href=#tab1>Tab 1</a></li> <li class=><a

  • 0

Here is the html:

<div id="wrapper">
 <ul class="tabs">
    <li class="active"><a href="#tab1">Tab 1</a></li>
    <li class=""><a href="#tab2">Tab 2</a></li>
    <li class=""><a href="#tab3">Tab 3</a></li>     
 </ul>
 <div class="tab-container">
 <div id="tab1" class="tab-content" style="display: none; ">     
  <h2>Title</h2>
  <p>Text</p>
  <p><a href="http://fakelink.html"><img src="btn.png"></a></p>
 </div>
 </div>
 <div id="tab2" class="tab-content" style="display: none; ">     
  <h2>Title</h2>
  <p>Text</p>
  <p><a href="http://fakelink.html"><img src="btn.png"></a></p>
 </div>
 </div>
<div id="tab3" class="tab-content" style="display: none; ">     
  <h2>Title</h2>
  <p>Text</p>
  <p><a href="http://fakelink.html"><img src="btn.png"></a></p>
 </div>
 </div>  
 </div>
 </div>

Script:

(function($) {

$(document).ready(function() {
$(".tab-content").hide();
 $("#tab1").show(); 
//On Click Event
$("ul.tabs li").mouseover(function() {
    $("ul.tabs li").removeClass("active"); 
    $(this).addClass("active"); 
    $(".tab-content").hide(); 
    var activeTab = $(this).find("a").attr("href");
     $(activeTab).fadeIn();
    return false;

});
    });
    })(jQuery);

Everything works fine for the tabs, the li class changes to active when I mouseover. However the tab-content does not change from display:none to display:block. :/

  • 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-01T10:46:39+00:00Added an answer on June 1, 2026 at 10:46 am

    demo jsBin

    the jQ:

    (function($) {
    
      $(document).ready(function() {
        
         $(".tab-content").hide();
         $("#tab1").show(); 
    
         $("ul.tabs li").mouseover(function() {
           
            var i = $(this).index();
           
            $("ul.tabs li").removeClass("active"); 
            $(this).addClass("active"); 
           
            $(".tab-content").hide(); 
           $(".tab-content").eq(i).fadeTo(300,1);
           
            return false;  
         });
        
      });
      
    })(jQuery);
    

    THe FIXED HTML: (I removed ID and other unneeded stuff.)

    <div id="wrapper">
      
       <ul class="tabs">
        <li><b>Tab 1</b></li>
        <li><b>Tab 2</b></li>
        <li><b>Tab 3</b></li>     
       </ul>
        
    </div>
        
    <div class="tab-container">
        
        <div class="tab-content" style="display: none; ">     
           <h2>Title1</h2>
           <p>Text1</p>
           <p><a href="http://fakelink.html"><img src="btn.png"></a></p>
        </div>
    
        
        <div class="tab-content" style="display: none; ">     
           <h2>Title2</h2>
           <p>Text2</p>
           <p><a href="http://fakelink.html"><img src="btn.png"></a></p>
       </div>
        
    
      
       <div class="tab-content" style="display: none; ">     
          <h2>Title3</h2>
          <p>Text3</p>
          <p><a href="http://fakelink.html"><img src="btn.png"></a></p>
       </div>
    
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following HTML structure: <div id=wrapper> <div id=top> <a href=http://example.com class=link>click here</a> </div>
Given the following HTML structure: <div class=wrapper> <div class=top> <a href=http://example.com class=link>click here</a> </div>
I have html like so: <div class=foo> (<a href=forum.example.com>forum</a>) <p> Some html here.... </div>
Here is my HTML: <tr> <td colspan=2 class=borderBottomCell> <div class=benefitInfo style=WIDTH: 99%! important;> <asp:DropDownList
Here is my HTML: <li> <div class=menu_inner> <a href=#> <div class=button><img class=486 src=images/portalbutton.png /></div>
I have this simple js tabs. Here is the html : <div class=product-collateral> <div
Here's my html as basic as possible: <div class=wrapper> <div class=left>foo</div> <div class=middle>foo</div> <div
Consider the following example: ( live demo here ) HTML: <div id=outer_wrapper> <div class=wrapper>
first here is my html demo code <div class=wrapper> <div class=item></div> <div class=item></div> <div
Consider the following example : HTML: <div class=wrapper> <div class=left>Some text here</div><div class=right>Hello Stack

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.