SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Mar 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get this affect... multple pics/news changing after 3 secs or so

    Hi,
    I was looking at http://www.controlrisks.com/ and www.cnet.com and the way they do there front page. The news link changes as the image changes and there are about 4 links/images. I was wondering how this feature can be accomplished. Initially I thought its Flash but looks like its just images and is more like a slideshow. I looked at code and its divs with the image in <p> tag and the opacity keeps on changing dynamically everytime.

    Code:
    <div class="caseStudy" id="caseStudy1" style="opacity: 0; visibility: hidden; display: block;">
    <p>
    <img width="325" height="229" alt="World updates" src="images/crg_image3.jpg"/>
    </p>
    <div>
    Any suggestions?

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't looked at those pages, but you can do it in at least two ways in addition to Flash:
    • Use an animated image (e.g., GIF) that changes every few seconds.
    • Use JavaScript to execute a function in a timer.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Member costin_trifan's Avatar
    Join Date
    Apr 2007
    Location
    Romania
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use a timer script to rotate your pictures and text.
    If you don't know how to do that just search the web for free javascripts scripts and you'll have the answer to your question.

    Cheers.

  4. #4
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Google for "javascript slideshow".

  5. #5
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I remember someone mentioning that there was something similar to what you are asking about at www.dynamicdrive.com (a javascript solution). I would do a search at the site for 'javascript slideshow' or 'fading image' or similar.

    Nadia

  6. #6
    SitePoint Addict
    Join Date
    Mar 2006
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you all. Google search for "javascript slideshow" helped me in getting to know how this is implemented. Sometimes you just know the feature but dont know exactly what keyword to search for on Google.


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
  •