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

  • Home
  • SEARCH
  • 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 7581125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:07:24+00:00 2026-05-30T18:07:24+00:00

This is my code : HTML <div style="float:left; width:100px;"> <a class="openTab" href="http://www.link.it">1 Line</a> <div

  • 0

This is my code :

HTML

<div style="float:left; width:100px;">
    <a class="openTab" href="http://www.link.it">1 Line</a>
    <div style="display:none;">My Text</div>
</div>    

<div style="float:left; width:100px;">
    <a class="openTab" href="http://www.link.it">3 Lines</a>
    <div style="display:none;">My Text<br /> on 3<br> Lines</div>
</div>        

<div style="float:left; width:100px;">
    <a class="openTab" href="http://www.link.it">2 Lines</a>
    <div style="display:none;">My Text<br /> on 2 Lines</div>
</div>            

<div class="fascia" style="display:none;">
    <div class="openedTab"></div>
</div>

CSS

.openedTab
{
    float:left;
    background-color:red;
}​

jQuery

$('.openTab').hover(function(e) {
    e.preventDefault();

    $('.openedTab').html($(this).next().html());

    $('.fascia').slideDown('200', function() { });
    
});​

if you hover a link, you can see the slideDown() in action (it scroll making animation).
Now, I’d like to have this animation to the max height for each div when I go hover it.

I mean : if I go on Link1 and than on Link2, I want to see the scroll to the bottom, starting from the height of Link1. Also, from Link2 to Link3, it must scroll to the top, till it get the height of content of link3.

How can I do it?

  • 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-30T18:07:26+00:00Added an answer on May 30, 2026 at 6:07 pm

    You should define the div height of the “.fascia”, then the .slideDown will work as you please.
    You can always use .animate() and set the needed css with it.

    EDIT:

    To clarify, for a completely dynamic maximum height, you need to go through each element, determine their height and store the maximum value. Then add this to the desired element.

    if you really wanted a dynamic height:

    <div style="float:left; width:100px;" class="line">
        <a class="openTab" href="http://www.link.it">1 Line</a>
        <div style="display:none;">My Text</div>
    </div>    
    
    <div style="float:left; width:100px;" class="line">
        <a class="openTab" href="http://www.link.it">3 Lines</a>
        <div style="display:none;">My Text<br /> on 3<br> Lines</div>
    </div>        
    
    <div style="float:left; width:100px;" class="line">
        <a class="openTab" href="http://www.link.it">2 Lines</a>
        <div style="display:none;">My Text<br /> on 2 Lines</div>
    </div>            
    
    <div class="fascia" style="display:none;">
        <div class="openedTab"></div>
    </div>
    

    ​

    JavaScript

    var elements = $('.line div'),
    maxH = 0;
    
    $.each(elements,function(key,val){
        var elH = $(elements[key]).css('display','').height();
        maxH = (elH > maxH) ? elH : maxH;
        $(elements[key]).css('display','none');
    });
    
    $('.fascia div').height(maxH);
    
    $('.openTab').hover(function(e) {
        e.preventDefault();
    
        $('.openedTab').html($(this).next().html());
    
        $('.fascia').slideDown('200', function() { });
    
    });​
    

    Enjoy!

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

Sidebar

Related Questions

I have this code : HTML <div class="temperatura"> <a href="/link/" class="temperatura_localita"> <div style="padding-left:12px;"> Text1
This is my code : HTML <div style="display:none;"> <div id="example"> <div class="child">Hello</div> </div> </div>
I have this code : HTML <div class="box_video"> <object width="330" height="290" type="application/x-shockwave-flash" data="http://www.youtube.com/v/KEkR1ox_K10?version=3&amp;f=user_uploads&amp;app=youtube_gdata&amp;rel=1&amp;border=0&amp;fs=1&amp;autoplay=0" style="visibility:
I have this code : HTML (meaning 4.0) <div class="temperatura"> <a href="/link/" class="temperatura_localita"> <span
This is my code : HTML <input type="textbox" id="txtComune" /> <div id="myOwnMenuComuni" style="position:absolute; top:0;
I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
Say I have jquery code like this: html += '<div class=index>' + item.index +
I have a html tag with inline CSS style like: <body><div style="position:absolute;top:100px;"></body> and I
Currently I have the code: <!-- More html code above --> <div id="loading" style="display:
This code / markup... <ul id="tag-directory" class="clearfix"> <li py:for="tag in tags"><a href="${h.url_for(controller='/media', action='index', tag=tag.slug)}">${tag.name}</a>

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.