xmarkclx / paragraphReadMore

Adds a read more link to groups of HTML paragraphs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Paragraph Read More JS

If there is more than one non-blank paragraph inside the class, the other paragraphs will be hidden inside a read more link.

Clicking on the read more link will show the hidden text. Clicking on the link again (now called, read less) will hide the text again.

#How to Use Wrap the paragraphs inside the class "can-read-more". Then include the included javascript file (readMore.js)

Ex.

<div class="filter-intro-text main-content can-read-more">
    <h1>Thailand Weddings</h1>
    <p>This will show</p>
    <p>This will only show when Read more is clicked</p>
    <p>This too</p>
</div>

#Maintainers

About

Adds a read more link to groups of HTML paragraphs.


Languages

Language:JavaScript 100.0%