Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2005
    Thanked 0 Times in 0 Posts

    how would you create yahoo-like "read full story"?

    I am looking to do something similar to what yahoo does with their online stories.

    If you visit http://news.yahoo.com/s/nm/20090221/ts_nm/us_obama you will see the "read full article" link at the bottom of the story, which when clicked, expands to show the whole story. Furthermore, if javascript is disabled, the whole story displays.

    I haven't been able to find any examples of this and would prefer to use the jquery framework. Does anyone have any ideas as to how to do this? I am a notice when it comes to javascript.


  2. #2
    Master Coder
    Join Date
    Apr 2003
    in my house
    Thanked 201 Times in 197 Posts
    I don't see much differecne whether js is disabled or not. The whole story shows either way.

    what I used to do when trying to understand why pages do what they do, is copy them to my hdd. then remove code piece by piece until I idnetify the code that does the thing I am interested in.

    try that and see how you get on.

    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  3. #3
    New to the CF scene
    Join Date
    Feb 2009
    Thanked 0 Times in 0 Posts
    If your new to javascript I recommend checking out JQuery (www.jquery.com)

    Its a lightweight framework which makes powerful javascript very short and simple.

    Download the minimised pack, have a little look through the documentation and then google "jquery show hide"

    The basic concept is have an element with the shortened text folowed by an element with the full text.
    You can either hard-code a show/hide link or have jquery add it later (better do this once u grasp the basics)

    Then on page load Jquery hides the second element until its told to show it.
    Provides perfect usability and compatibility with non-javascript browsers.


Posting Permissions

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