So I have something like
<ul>
<li> <a href="123.html">123</a></li>
<li> <a href="abc.html">abc</a></li>
</ul>
This sites in my INDEX.HTML file. Except there are loads more lists and list items. Each HTML page that is linked to has a section like this:
<ul>
<li><strong>Time: </strong>12:00</li>
</ul>
What I want is when the user sees the INDEX.HTML page, the time gets added to the end (from the relative link) so it reads like
- 123 – 12:00
- ABC – 13:00
Can someone please help? I realise I might need contents() and fine() but have got nowhere quick. So basically for each link, we go to the URL in question, grab the time and add it the original line on INDEX.HTML
Thanks.
The idea could be as follows:
lis.hrefattribute of theachild.li.On jsFiddle it’s not very easy to generate separate pages, so you’ll have to alter it a bit for your case. Also, you may want to make the selector stricter (
ul strongis the best I can make up with your example).http://jsfiddle.net/3JQDz/