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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:46:15+00:00 2026-06-17T18:46:15+00:00

Ok so the other day I asked about using .load with a variable, and

  • 0

Ok so the other day I asked about using .load with a variable, and well it stuck very well and glad that SO could help me. I have another question though, I am trying to limit the elements that are being loaded, I am calling .tdtopics and it will load all the .tdtopics from the page url i am loading. Instead I want to limit it to say 5 and that is it.

Two Codes I tried one is all elements other is one element only.

$(function(){
  $('body').append('<span id="view_mess">New Message</span><div id="mess_wrapper"><div id="new_mess_pop"></div></div><div id="message_holder"></div>');
    $('#message_holder').load('/privmsg?folder=inbox .tdtopics');
 $('#view_mess').click(function() {
    var msg = $('.tdtopics a').attr('href');
  $('#new_mess_pop').load(msg + ' .post');
   $('#mess_wrapper').show();
    $('.postfoot').remove();
 });
$('#mess_wrapper').click(function(){
  $(this).hide();
 });
});

….

$(function(){
 $('body').append('<span id="view_mess">New Message</span><div id="mess_wrapper"><div id="new_mess_pop"></div></div><div id="message_holder"></div>');
  $('#message_holder').load('/privmsg?folder=inbox .tdtopics:eq(0)');
 $('#view_mess').click(function() {
  var msg = $('.tdtopics a').attr('href');
   $('#new_mess_pop').load(msg + ' .post');
    $('#mess_wrapper').show();
     $('.postfoot').remove();
   });
  $('#mess_wrapper').click(function(){
   $(this).hide();
  });
 });

Also for any hints on this would be nice, though I am going to read up on it later, I want to know if I could present this a plugin, and exactly how to start that? I think i would start off with $.fn.function then create the defaults? Like I said I’m going to read on this anyways, just wanted to know if any SO users had any advice on creating the plugin

  • 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-17T18:46:16+00:00Added an answer on June 17, 2026 at 6:46 pm

    Try :lt

    $('#message_holder').load('/privmsg?folder=inbox .tdtopics:lt(5)');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is very similar to a question I asked the other day but my
This is very similar to a question I asked the other day but my
So the other day, I asked this question about how to combine three complex
I asked a question the other day about how rows are added to a
I have a question about email verification and user registration. The other day I
asked the next thing from Heroku support the other day: I have an app
I asked this the other day but it was closed, probably because I have
I asked a dumb question the other day ( dumb question ) about the
The other day I asked a question about how to get a histogram of
I asked a question the other day regarding overlay icons. With help, I figured

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.