Hi Bob,
I found two issues, one with Readmore.js, and one with your JavaScript.
- You were using the minified version included in the Readmore.js project, which I neglected to update with last round of changes. I have fixed that now. You can either pull the latest from https://github.com/jedfoster/Readmore.js or use the
readmore.min.js
file in this gist. - jQuery's
.load()
is asynchronous, so by calling$("#tagCloud").load("ajam_tags.html #tagCloud")
and$("#tagCloud").readmore()
separately#tagCloud
is empty when Readmore.js is initialized. So you need to wait for.load()
to finish loading and inserting the content before you initialize Readmore.js. That's where thecomplete
callback parameter of.load()
comes in handy. Read about it here.
Hope that helps,
Jed Foster