Results 1 to 5 of 5

Thread: gradual fading image

  1. #1
    Join Date
    Mar 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy gradual fading image

    hi i am new around here... sorry if i post it in the wrong place.
    i have a xanga site:
    http://www.xanga.com/snakeseasoft82

    and i tried to use the script from: http://www.dynamicdrive.com/dynamici...lightgrad2.htm

    i am puzzled because the image stayed transparent despite hovering on it.
    is it that the script is incompatible for online diary or did i do something wrong? 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

    I notice you appear to have other script(s) on the page, could be a script conflict. I really didn't want to wait around for the .wav to load to find out for sure what the problem was.
    - John
    ________________________

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

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

    Default

    Quote Originally Posted by John
    I really didn't want to wait around for the .wav to load to find out for sure what the problem was.
    Ouch. snake: that script is outdated and browser-restrictive for no good reason. Use this one of mine instead.
    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!

  4. #4
    Join Date
    Mar 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks alot twey. but i am a total computer idiot.
    i had difficulty understanding your script. so where and what should i put in the head and what should i put behind the image img src=XXX...?
    thanks a bunch!!!

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

    Default

    In the head:
    Code:
    <script type="text/javascript" src="FadableObject.js"></script>
    <script type="text/javascript">
    var fn = function() {
      new FadableObject(document.getElementById("imageOne"), 1, 10, 30, 99, true, false);
    };
    
    if (window.attachEvent) window.attachEvent("onload", fn);
    else if(window.addEventListener) window.addEventListener("onload", fn, false);
    else {
      window.overriddenonload = window.onload;
      window.onload = function() { fn(); window.overriddenonload(); }
    }
    </script>
    In the body, where you want the image:
    Code:
    <img src="myImage.png" id="imageOne" onmouseover="this.fadeThread.fadeIn();" onmouseout="this.fadeThread.fadeOut();">
    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
  •