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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:58:56+00:00 2026-05-28T13:58:56+00:00

Here is the description of problem . I have parent div(allcomments_4) and than inside

  • 0

Here is the description of problem . I have parent div(allcomments_4) and than inside it , i have few child divs(oneEntry) with their own children inside but i just need to find the last child of the parent node(allComments_4). I want to read the content inside of div(lastComment) it than add it above this div which will be similar like above div (oneEntry) using jquery. I want to do this manipulation using ids not class. As i calculate the id of allComments_4 div . I tried like this.

<script>
    var allcommentsId =allcomments_4
    var right = "div#lastComment"
    var left = '#'+allcommentsId 
    var message = $(left>right ).html()
    alert(message)
</script>

<div id="allcomments_4">
 <div class="oneEntry">
   <div class="commentImage">
   </div>
   <div class="commentEntry">
   <div class="commentText">
   </div>
   <div class="commentDate">
    Commented On -"Thu Jan 26 16:44:16 EST 2012"/>
   </div>
 </div>
 <div class="oneEntry">
   <div class="commentImage">
   </div>
   <div class="commentEntry">
   <div class="commentText">
   </div>
   <div class="commentDate">
    Commented On -"Thu Jan 26 16:44:16 EST 2012"/>
   </div>
 </div>
</div><!-- One Comment Entry Ends here -->
<div id ="lastComment">
</div><!-- last Comment ends here -->
</div><!-- All Comments Ends here -->

I think missing something and i am sorry for asking such lame question as i am beginner in jquery and this whole javascript thing.

  • 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-28T13:58:56+00:00Added an answer on May 28, 2026 at 1:58 pm
    var message = $(left>right ).html()
    

    This does not work as it gives the result of the bigger than comparison as parameter. It has to look like this:

    var message = $(left + ' > ' + right).html()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a parent to child relationship. My problem is, when I access the
Here is a description of my problem: I have got TabActivity consists of three
I am facing a problem on developing my web app, here is the description:
Ok, so here's the full description of the problem I'm having: I am trying
Ok here is my problem : Before i start the description, let me to
Before I describe my problem, here is a description of the program (IHExplorer.exe) I'm
Here's the problem: I have a list of items on a page, each with
I have a problem with static library symbols missed in linked executable. Here is
Here's my problem: I have a NetConnection object connected to a server. On top
Problem: I have an enumerated type which has description tags in the following style:

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.