Reputation: 1689
I am trying to use this text expander/collapse jQuery plugin to only display first snippets of text, but if I load this in the page the whole text would show up first and then when the plugin is fully loaded in to the browser it would collapse down(I could visually see this process). Is there any technique that you can teach me so that only collapsed text would display first?
Here is the plugin I am trying to use: http://plugins.learningjquery.com/expander/demo/index.html
Upvotes: 0
Views: 820
Reputation: 2870
You could put some css into the paragraph type you're collapsing, and hide it when it hasn't been collapsed
<p id="textblock" style="display:none">
then use jQuery to show it right after your plugin collapses it
$("textblock").show()
Upvotes: 2