Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Show content / Read more

    I have text:
    JavaScript is a programming language used to make web pages interactive. It runs on your visitor's computer and doesn't require constant downloads from your website. JavaScript is often used to create polls and quizzes.

    How to make link "read more"
    Example:
    JavaScript is a programming language used to make web pages interactive. It runs on your visitor's computer and doesn't require constant downloads from your website...Read more < Click and open text:
    JavaScript is often used to create polls and quizzes.

    Remember: "Read more" link must hiding after clicking.

    Very Thanks

  • #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,075
    Thanks
    38
    Thanked 498 Times in 492 Posts

    Lightbulb

    You should at least make an attempt at some coding.

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <meta charset="utf-8" />
    <title> Untitled </title>
    <script type="text/javascript">
    function readMore(IDS) {
      document.getElementById(IDS+'a').style.display = 'none';
      document.getElementById(IDS+'b').style.display = 'inline';
    }
    </script>
    
    <style type="text/css">
    
    </style>
    </head>
    <body>
    JavaScript is a programming language used to make web pages interactive. <br>
    It runs on your visitor's computer and doesn't require constant downloads from your website.
    <span id="rm0a" onclick="readMore('rm0')">...<b>Read more</b></span>
    <span id="rm0b" style="display:none"><br>JavaScript is often used to create polls and quizzes.</span>
    </body>
    </html>

  • Users who have thanked jmrker for this post:

    readme (09-07-2012)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •