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

The Archive Base Latest Questions

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

If I have this structure: <h5>Some Text</h5> <div>Some more text related to the text

  • 0

If I have this structure:

<h5>Some Text</h5>
<div>Some more text related to the text above.</div>

I know I can select the div with:

$('h5 + div')

My problem is if I have a jquery Object already containing the h5 tag, is there a way to access that following div?

$('h5').each(function() {
    // now how do I grab the div just below it?
    $DIV = ??????????
}

$.next() only apparently finds actual siblings (the tags must be the same) so its not any help here.

The documentation made it look like .next only got tags of the same type, and when I tested I made a different error, so this question is really a non-question :-\

  • 1 1 Answer
  • 1 View
  • 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-24T13:51:59+00:00Added an answer on May 24, 2026 at 1:51 pm

    Just use this, you can specify the selector while using next so it will look for that in the siblings.

    $('h5').next("div");
    

    Looking at your markup, next() will also help you since div is the immediate sibling of h5.

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

Sidebar

Related Questions

This is the structure of my HTML: <div> <span>Some text</span> <br/> <span>Not much text</span>
Good day to all. I have this structure <html> <iframe> <div id=idd>Some Content</div> </iframe>
I have a following problem here: in my html structure I got some div's
I have this file structure: folderIWantStuffIn/ - old_stuff Now I want to add some
I have some data and need to create a json file with this structure
I have a simple table that has this structure: <table> <thead> <tr> <td>Some info</td>
I currently have a table structure that looks something like this(some details omitted): ColumnName
I have the following structure in a form: <div class='full'> <div class='half'> <label>Book</label> <select
I have a header row which has this structure: <th... <a... <span... {text} If
I have a little problem with jquery and a div menu that is not

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.