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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:42:38+00:00 2026-05-23T04:42:38+00:00

I am a Javascript noob and I need help adding a codeblock after a

  • 0

I am a Javascript noob and I need help adding a codeblock after a div.

i want to add code after the following class

<div class='post-body entry-content'> 

So mu JQuery code must be

$('post-body entry-content').add('<img border="0" src="http://4.bp.blogspot.com/-C4vvMEB9MyI/TfW0lduV2NI/AAAAAAAAAZc/N7HL1pUusGw/s1600/some image.png" />');

Right ??

If I am wrong please correct me !

  • 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-23T04:42:39+00:00Added an answer on May 23, 2026 at 4:42 am

    No, that is incorrect.

    • Use the . to select by class and join them together if you want to match elements which include all classes.
    • To make the image come after, use after().
    • Also make sure this code is executed after the element exists. Best way to do that is wrap it with the DOM ready event.
    $(function() {
    
        $('.post-body.entry-content')
           .after('<img border="0" src="http://4.bp.blogspot.com/-C4vvMEB9MyI/TfW0lduV2NI/AAAAAAAAAZc/N7HL1pUusGw/s1600/some image.png" />');
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a javascript noob and I need help with this problem ! On
Javascript noob here (I'm assuming I will need Javascript to solve this). I need
I am a real noob when it comes to javascript/ajax, so any help will
Little help for a javascript noob please... I have this in a .js file
I'm noob to JavaScript and want to use Prototype JS Framework to get some
I've recently been looking at functional programming with Javascript, to which I'm a noob.
Greets! I'm a noob struggling to learn html and javascript - getting there slowly.
JavaScript post request like a form submit shows you how to submit a form
Javascript I have code that will hide various sections in a MS CRM form
I'm a noob at Javascript, but I'm trying to implement something on my website

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.