Toggle to view more text - Jquery
Hello, this is content1 class Hello, this is content2 class - slide toggle The long text the better Longer longerr <button id="viewmore">View more...</button> <style> div.content2{ background: #ccc; padding: 30px 0px; } </style> <pre data-lang="HTML"><code><div>Hello, this is content1 class</div> <div>Hello, this is content2 class - slide toggle<br> The long text the better<br>Longer<br>longerr</div> <button id="viewmore">View more...</button> <script> $(document).ready(function(){ $("div.content2").hide(); $("button#viewmore").click(function(){ $("div.content2").slideToggle(); }); }); </script></code></pre>