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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:15:24+00:00 2026-05-14T23:15:24+00:00

I have something like this: … <div id=d120 >content</div> <div id=d123 >content</div> <div id=d112

  • 0

I have something like this:
…

<div id="d120" >content</div>
<div id="d123" >content</div>
<div id="d112" >content</div>
<div id="d145" >content</div>
<div id="d134" >content</div>
//Insert here hello world

<div id="bla" >asd</div>
<div id="footer" >asd</div>

anybody knows how to insert html after all the divs that have id like d+number

  • 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-14T23:15:25+00:00Added an answer on May 14, 2026 at 11:15 pm

    If the format doesn’t have anything between those divs and #bla like your example, here’s a safer approach using .before() (since div[id^=d] would match <div id="doodlesticks"> as well).

    $("#bla").before("<b>Hi There</b>");
    

    Update: Since you said it’s possible to give them a class, I’d do that, so give the content divs a class="content" and use this jQuery:

    $(".content:last").after("<b>Hi There</b>");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have something like this: <div id='d12'>content</div> <div id='d23'>content</div> <div id='d34'>content</div> and I would
I have something like this: <div class=content> <a href=#>A</a> </div> <div class=content> <a href=#>B</a>
I have something like this: body-viewport div-page.active div-panel div-page div-page div-page div-page.active //start here
I have something like this in my page: <div id=test> <div class=item>Test</div> <div class=item>Test</div>
I have something like this and it has been created from jQuery .append(html) <div
I have something like this <div id=dis_image></div> <div id=images> <img src=1/1.jpg class=image style=opacity:0.3 />
I have something like this coming as a JSON reponse: <span id=\my-id-527114\>Some data here</span>\n
I have something like this: <div class=wrapper> <div class=drag object1>Example1</div> <div class=drag object1>Example1</div> <div
I have something like this: <?php $fix1 = XXXXXXX //Integer. Problem isn't here. Extracted
I have something like this: for(int i=0; i<5; i++){ mytextarea.setText(hello + i); try{ Thread.currentThread().sleep(1000);

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.