jQuery Simple Toggle Read More Read Less

Using a jQuery Simple Toggle Script is all fine and dandy, but what if you want to add a little something extra.

What if you want it to say Read More, then when you click it, it says “Read Less”? How about an Open and Close button?

Here’s the snippet.

jQuery Simple Toggle Script – Read More Read Less

[code language=”javascript”]


Read More


$(this).prev().slideToggle(function() {
$(this).next(‘p.readMore’).text(function (index, text) {
return (text == ‘Read More’ ? ‘Read Less’ : ‘Read More’);

return false;


Then all you have to do is add the HTML


This is a paragraph with hidden text after it.
<div class="hiddenText">Blah blah blah</div>

The code will add a Read More directly BEFORE the hiddenText class. So that when it’s clicked, the hidden text will show and the “Read More” then becomes “Read Less”.

You can just as well do this with any words you want, just keep it consistent.


    • surefireweb says

      Not really sure how blogspot works but as long as you have access to an area where you can add javascript, I don’t see why not.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>