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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:21:30+00:00 2026-05-20T08:21:30+00:00

I am currently pulling an RSS feed in which the the format is essentially

  • 0

I am currently pulling an RSS feed in which the the format is essentially title->image->text content. I would like to reformat it so that the image comes first. I am currently trying:

<script type="text/javascript">
    $(document).ready(function() {
$("li.rssitem").each(function() {
$(".rssdescription a img").remove().insertBefore("h3");
    });
    });
</script>

HTML looks like:

<ul id="rssitems">

<li class="rssitem"><h3 class="rsstitle"></h3>
<div class="rssdescription"><p><a href="#"><img src="..."></a></p><p>content</p></div></li>

<li class="rssitem"><h3 class="rsstitle">><a href="#">...</a></h3>
<div class="rssdescription"><p><a href="#"><img src="..."></a></p><p>content</p></div></li>

</ul>

Which works except that there are many items (all with images) in the list. This code puts ALL the images before all the h3’s. I am clearly having trouble looping correctly. Thanks so much guys!

  • 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-20T08:21:30+00:00Added an answer on May 20, 2026 at 8:21 am

    Try this code :

    $("li.rssitem").each(function() {
        var target = $(this).children("h3");
        $(this).find("img").each(function() {
            $(this).remove();
            $(target).before($(this));
        });    
    });
    

    I didn’t tested it, so I’m not sure it will work out of the box, but hopefully you’ll be able to modify it to suits your needs.

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

Sidebar

Related Questions

I have an RSS feed that I'm setting up on my new site using
I am currently writing an application that pulls new information from RSS sources and
i'm currently working on iphone app which has a web view. i'm pulling a
I'm currently working with an automation framework that is pulling a webpage down for
Currently I'm doing some unit tests which are executed from bash. Unit tests are
Currently, I am developing a product that does fairly intensive calculations using MS SQL
I am currently pulling three form field inputs off the request object. The day,
We're currently pulling jQuery and jQueryUI (and jQueryUI CSS) libraries from the google CDN.
Currently my application takes in a text file/files, parses them into another file type
Currently I have an application that takes information from a SQLite database and puts

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.