Results 1 to 3 of 3

Thread: Timer for zoomed image

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,085
    Thanks
    157
    Thanked 3 Times in 3 Posts

    Default Timer for zoomed image

    I have applied this script to my web site http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm
    It currently has to be manually closed to minimise it again.

    Is there css for such ting as a timer,if not clicked on to close withing say 5 seconds it will close automatically.
    Here is one page its working on.
    http://www.theremotedoctor.co.uk/honda_keys.html

    Please advise

    Thanks very much.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    .
    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    That said, there is no way to do that via CSS. At least none I'm familiar with. There might be a CSS 3 method, but if there is it would be pretty complicated and unsupported in some browsers. Javascript can do this though -

    Put this script:

    Code:
    <script type="text/javascript">
    thumbnailviewer.showthumbBox=function(){ //Show ThumbBox div
    thumbnailviewer.thumbLoading.style.visibility="hidden" //Hide "loading" div
    this.centerDiv(this.thumbBox)
    if (this.enableAnimation){ //If fading animation enabled
    this.currentopacity=0.1 //Starting opacity value
    this.opacitytimer=setInterval("thumbnailviewer.opacityanimation()", 20)
    }
    var tb = this;
    setTimeout(function(){tb.closeit();}, 5000);
    };
    </script>
    after this (after adding back the required credit):

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <link rel="stylesheet" href="thumbnailviewer.css" type="text/css" />
    <script src="thumbnailviewer.js" type="text/javascript">
    
    /***********************************************
    * Image Thumbnail Viewer Script-  Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,085
    Thanks
    157
    Thanked 3 Times in 3 Posts

    Default

    Many thanks & credit now re-applied.

Similar Threads

  1. PHP Timer Image
    By M2com in forum PHP
    Replies: 3
    Last Post: 01-16-2012, 12:43 AM
  2. Timer for image display.
    By rydorien in forum Looking for such a script or service
    Replies: 3
    Last Post: 10-24-2011, 12:42 PM
  3. Replies: 5
    Last Post: 09-21-2011, 05:36 PM
  4. Resolved How to get the first image zoomed on load?
    By dc2698 in forum JavaScript
    Replies: 2
    Last Post: 04-30-2009, 06:24 PM
  5. Swap image on timer?
    By AmenKa in forum JavaScript
    Replies: 3
    Last Post: 03-15-2008, 06:46 PM

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
  •