Category Covered

How to show-hide or Read more-less article using a simple javascript

How to show/hide or Read more/less article using a simple javascript
 
 Here I have given a simple example of read more text using simple javascript code.
    <div class="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, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

    <br />
   
    <div id="expand">
         It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

    </div>
   
    <a id="more"  href="#" onclick="more(); return false;" title="Read More">&#x25BC;</a>
    <a id="less"  href="#" onclick="more(); return false;" title="less">&#x25B2;</a>
</div>
<script>
    $('#expand').hide();
    $('#less').hide();
    function more(){
        $('#expand').slideToggle('slow');
        $('#more').toggle();
        $('#less').toggle();
    }
</script>