Collapsible Blog Posts
david-bieber.tumblr.com
david-bieber.tumblr.com
In a typical blog post, the summaries shouldn't be necessary. A good use case for Collapsible Blogging is when you are listing multiple items or events, and the reader may only be interested in reading about one or two. Then the reader can choose to expand just those. May be better as Expandable Blogging rather than Collapsible Blogging.
I'm going to try it out this way and see what people think.
<p>
<div class="active">Short Form</div>
<div class="inactive">Long Form</div>
</p>
,where clicking switches the classes.<script> $(document).on("click", "p", function(event){ if($(this).hasClass("expanded"){ $(this).removeClass("expanded").addClass("collapsed"); } else{ $(this).removeClass("collapsed").addClass("expanded"); } }); </script>
<style> p.collapsed > div.big{ display:none; } p.collapsed > div.small{ display:block; }
p.expanded > div.big{
display:block;
}
p.expanded > div.small{
display:none;
}
</style><p class = 'expanded'> <div class = "big">click to collapse this</div> <div class = "small">click to expand this</div> </p> <p class = 'collapsed'> <div class = "big">click to collapse me</div> <div class = "small">click to expand me</div> </p>
Also easier than clicking each paragraph to see the point.
Don't want to discourage you, quite the opposite. Give it some more thought and try to refine these points, I'd really like to see a new iteration
Also the first sentence of a paragraph should provide a summary of the following paragraph if following good writing guidelines (kinda http://www.une.edu.au/tlc/aso/students/factsheets/paragraph....)
On the other hand, collapsible blog posts could help the writer. For instance after writing a blog post I would love if in iAWriter or WriteMonkey I could collapse all the paragraphs to just their respective first sentence. If the collapsed text would still bring my argument across I did a good job, if not I'd have to rework it.
It does have some downsides, and alas, the biggest ones show up in the reblogs of the content on Tumblr — you reblog that post and you see everything. My suggestion would be to see if you could do the collapsible effect with a p title tag, rather than setting two paragraph with two CSS classes, and embedding the Javascript into the post. That way, the effect follows people on Tumblr reblogs.
I'm a bit of a nut for visual effects like this, though. I might try it at some point. Good work.
I was going for something that could be quickly reused without much thought. I'll have to see if my script lives up to that as I continue blogging.
Firebug shows this error:
TypeError: e.srcElement is undefined
http://david-bieber.tumblr.com/post/30907535147/collapsible-...
Line 372