I am using an RSS Feed and want to append the Date into the description, obviously there are more than one date and description.
How can I prepend so that the dates are relative to the parent?
I have tried answers on here but can’t get them to work, beginner at JQuery.
So far I have
$('.RSSItem').each (function() {
$('.Description').prepend($('.PubDate') );
});
HTML
<div class="RSSItem">
<div class="Description">
<div class="PubDate">Monday, 14 January 2013</div>
</div>
Each date needs to be moved into the Description, problem I am having is that all the dates for each RSSItem are showing for each RSSItem, I just want the one relevant to the RSSItem.
Any help gratefully received.
Assuming that there may be multiple RSSItems, and multiple descriptions, and assuming that the PubDates are contained right underneath the RSSItems in your source (there seems to be a closing div missing), I’d suggest that you loop through each of the RSSItems and descriptions: