Multiple 'read more' links on one page

I’d like to implement Viral Patel’s cool dynamic read more links to a page I’m working on. I’d like to add another level so that I could embed some of these links into another div…See demo here

Can I add this to the java or would it be better to create another script using a different div id?

Unfortunately the example page is returning a 404

Apologies link fixed…

I’d also like to allow h and p tags inside the comment div if possible?

The link in your first post points to and this is still returning a 404

Sorry Pullo only chaged the quoted link its - (i’ll wake up)

Hi there,

So the demo’s working now.
I can see three divs which display extra content when I click on the more link.

But what is it exactly that you are trying to do. I didn’t quite get it. Could you elaborate a little.


I’d like to have the same <div class=“comment more”> that could have the 3 divs inside of it - essentially another level up? (hope this makes sense).

You’d like to have three <div class=“comment more”> inside a <div class=“comment more”>.
Something like:

<div class="comment more">
  Some random text
  <div class="comment more">Some more random text</div>
  <div class="comment more">Some more random text</div>
  <div class="comment more">Some more random text</div>

Is that what you mean?

Apologies I should have added the html - Yes that is exactly what I’d like - also I cant seem to add any html elements inside the div’s like <p> <img> tags - it stops the jqery from working, I’d like to fix this also if possible???

This works just fine for me. Here’s a fiddle to demonstrate:

The other problem is a little trickier.
You’re trying to toggle divs within a div which is toggleable and this cannot work with your current code.

If I was you, I would use the show-hide plugin instead. Its homepage is here:
I’ve also made you a small demo here demonstrating nested content:
It is entirely configurable. If you don’t like the animation effect, you can disable that.


GENIUS - code is really well explained - thanks so much Pullo very appriciated!