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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:16:56+00:00 2026-05-27T20:16:56+00:00

The page I’m trying to load is something like this (although, the number of

  • 0

The page I’m trying to load is something like this (although, the number of paragraphs with the class “text” is different every time):

<html>
<body>
<div id="container">
<p class="text">1</p>
<p class="text">2</p>
<p class="text">3</p>
<p class="text">4</p>
<p class="text">5</p>
<p class="text">6</p>
<p class="text">7</p>
<p class="text">8</p>
<p class="text">9</p>
<p class="text">10</p>
<p class="text">11</p>
<p class="text">12</p>
<p class="text">13</p>
<p class="text">14</p>
<p class="text">15</p>
<p class="text">16</p>
<p class="text">17</p>
<p class="text">18</p>
<p class="text">19</p>
<p class="text">20</p>
<p class="sometext">Some other text here</p>
</div>
</body>
</html>

Is it possible to load only the first ten paragraphs with jQuery with something like $('#text').load('other_file.html #container .p');?

  • 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-27T20:16:57+00:00Added an answer on May 27, 2026 at 8:16 pm

    Use the :lt() selector. It’s 0-based so p:lt(10) should load the first 10 p elements.

    $('#text').load('other_file.html #container p:lt(10)');
    

    Keep in mind the whole response is still being downloaded, only a subsection is displayed via the selector.

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

Sidebar

Related Questions

The page is here: https://gentle-day-3026.herokuapp.com/ The css file like this: https://gentle-day-3026.herokuapp.com/stylesheets/base.css another is to
Page has image with hyperlink and that hyperlink has target=_blank and every time i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
My page's URL is like this: http://www.mydomain.com/directory/thisismy_page.html Using JavaScript, I want to pull out
page = 1; $('.links').click(function() { $(this).removeAttr('href'); page = $(this).html(); }); <a href=# class=links> 1
Page in question: http://www.rjlacount.com/public/lander/ I'm probably just doing something stupid, but I'm trying to
On page one I would like to create an instance of a class as
Page load time, when in RoR lifecycle do you start/stop a timer to get
Basically, what I'm trying to create is a page of div tags, each has
Page 120 of Programming Pearls 1st edition presents this algorithm for selecting M equally

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.