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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:51:49+00:00 2026-06-18T01:51:49+00:00

I have multiple html blocks in a jQuery cycle instance, like so: <div class=pane

  • 0

I have multiple html blocks in a jQuery cycle instance, like so:

<div class="pane" id="...">
 <div class="title">
  <span>...</span>
  <div class="sS">...</div>
 </div>
</div>

.pane is the cycle slide. I want to get the height of each of the spans independently (as they contain different amounts of text so some wrap onto two lines on smaller screens).

With the height calculated, I want to apply this value to the height of the parent .title – independently (without having to work it all out manually for each pane based on ID).

So far I have:

 $(".pane").each(function() {
    var tpheight =  $(this).find("span").outerHeight()
    $(this).find(".title").css({"height" : tpheight + "px"})
})

which sort of works (inclusion of “px” makes no difference) but the first span comes out as the correct height but all the other spans in the other panes are too short. I’m using outerHeight as I need to include the padding. This is the page I’m working on:

http://test.soundvaultstudios.co.uk/services

A lot of other posts talk about getting the height of the tallest element and applying that value to every other element, but I want the values all worked out independently. The reason I’m doing this is when you hover over the pane the title div gets a style of height:auto to reveal the contents of .sS , then on mouseleave the height of the title div reverts back to the height of the span. I hope that makes sense, have a look at the site to see what I mean. The hover function generates the correct height changes however, but I want the page to load in the same way.

Thanks in advance.

  • 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-18T01:51:50+00:00Added an answer on June 18, 2026 at 1:51 am

    I figured out where I was going wrong. My each function was setup perfectly fine, it was the position of it in relation to the cycle initialisation that was the problem (It was causing script placed after it to malfunction). Putting the cycle initialisation last in my block (or at least after my each function) has worked as I intended. If anyone sees this question who’s using Cycle, take note of the order of your script, Cycle last!

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

Sidebar

Related Questions

We have an HTML page with multiple div blocks. We want to separate these
I have an HTML form that needs multiple submit buttons, like this: <input type=submit
The HTML looks something like this: <li class=divider> <div> ...(maybe more divs)... <div class=content>
I have HTML code like this : <li><input type=hidden value=001 class=block-hidden-input /> <a href=#
I have an img html block <img src=folder1/folder2/folder3/logo1.png> positioned inside a big div like
I have a div containing multiple tables. Depending on the class of the div
http://jsfiddle.net/awfex/4/ HTML: <div class=section-header section-header-on id=section_header_289 style=left: 50px;> <span class=collapse></span> <div class=section-name> <span class=name>Testing
I have multiple HTML files which vary only by a little - a few
I have multiple dropdown list: @Html.DropDownListFor(x => x.HaveColoSpace.SelectedOptions, new SelectList(Model.HaveColoSpace.Options, Value, Text), new {
I have multiple javascript functions in my html page. One of them, by far

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.