Advanced Search

Results 1 to 4 of 4

Thread: renderReadability()

  1. #1
    Join Date
    Dec 2005
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default renderReadability()

    Can anyone give me some info on how to set this up in website... where I can find some code for this?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Certainly, if you give us some info as to what on earth you're actually trying to do. A single function name isn't much of a giveaway, you know.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2005
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No problem.... I want to have the ability for my visitors to enlarge the font size. I saw a website that offered that. They actually had two larger sizes that the people could click on to use. http://abcnews.go.com/Travel/story?id=1486744&page=1

    You will notice that it's under the banner at the top on the right-hand side.

    Thanks.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Most browsers already implement this. In Firefox, it's under View->Text Size.
    Nevertheless, this ought to work:
    Code:
    <a href="javascript:void(0);" onclick="
      var fs = document.body.style.fontSize;
      document.body.style.fontSize = (
        isNaN(parseFloat(fs))
          ? '18pt'
          : (parseFloat(fs) + 2) + fs.substring(parseFloat(fs).toString().length)
        );
    ">Increase Font Size</a>
    
    <a href="javascript:void(0);" onclick="
      var fs = document.body.style.fontSize;
      document.body.style.fontSize = (
        isNaN(parseFloat(fs))
          ? '18pt'
          : (parseFloat(fs) - 2) + fs.substring(parseFloat(fs).toString().length)
        );
    ">Decrease Font Size</a>
    
    <a href="javascript:void(0);" onclick="
    document.body.style.fontSize = '18pt';
    ">Default Font Size</a>
    Change "18pt" in all links to font sizes better suited to your site as a default. Tested only in Firefox, and that with only a very simple DOM.
    Last edited by Twey; 01-14-2006 at 11:48 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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