jQuery collapser automatically recognizes the pre hidden elements.
If you want the paragraph to be hidden and the plugin to show “Expand Paragraph”, then pre hide the target paragraph
i.e by adding a “display:none” styling to to the paragraph.
Example:
Some text
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s
Some text
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s
.
.
.
Live demo: http://jsfiddle.net/vaakash/CSLS7/
The text “Some text” will be automatically replaced with “Expand paragraph” or whatever as you give for the “expandHtml” object in the plugin settings.
The plugin automatically recognizes pre-hidden target elements.
Now only, i noted that there is a mistake in the demo. Thanks for your report.
Thanks
http://twitter.com/vaakash/