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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:13:52+00:00 2026-05-22T16:13:52+00:00

I am filling a unordered list with dynamic content and the list height will

  • 0

I am filling a unordered list with dynamic content and the list height will fir the content, does anyone know how I can get the height of the first 3 li tags in the unordered list?

The dynamic content produced might be something like below so I just want to be able to calculate the height of the first 3 li tags.

<ul>
<li>23 Feb 2011<br />Synergy Launch new website...<br />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc gravida lacus a ligula dictum dignissim....</li>
<li>23 Feb 2011<br />Expat children "receive improv...<br />Expat children enjoy a better standard of education whilst living abroad compared to their home country according to the HSBC Offshore Offspring Report,...</li>
<li>25 Feb 2011<br />London Market favours Landlord...<br />The lettings market has swung dramatically in favour of landlords as an average six applicants chase every available property in London. This is a dramatic rise...</li>
<li>23 Feb 2011<br />Synergy Launch new website...<br />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc gravida lacus a ligula dictum dignissim....</li>
</ul>

Thanks for any help
J.

  • 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-22T16:13:52+00:00Added an answer on May 22, 2026 at 4:13 pm

    This provides you with all of their height… but you could easily just put the code you want inside the function to perform something on each list item.

    var sum = 0;
    
    $('li:lt(3)').each(function() {
       sum += $(this).height();
    });
    

    http://jsfiddle.net/rnpAE/1/

    EDIT: Shortened$('li').nextUntil(':eq(2)') to $('li:lt(3)')

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

Sidebar

Related Questions

Does filling out HTML meta description/keyword tags matter for SEO?
I want to make a dynamic filling list that fill the screen what ever
I have a simple ASP.Net form with the following unordered list: <ul id=ctl00_ContentPlaceHolder1_BulletedList1> <li>No
I am filling a textarea with content for the user to edit. Is it
Users will be filling a field in with numbers relating to their account. Unfortunately,
I'm having some issues filling a list in Python. I keep getting a list
I am working on a project which will include automatically filling out some templates.
I am filling a char array using ReadProcessMemory and I am curious to know
I have a list named employeeList that I am filling with a datatable, which
I'm filling a drop-down list using the following: var columnNames = db.Mapping.MappingSource.GetModel(typeof(StaffDirectoryDataContext)) .GetMetaType(typeof(Person)).DataMembers; I'm

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.