Results 1 to 3 of 3

Thread: Gradual Element Fader

  1. #1
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Gradual Element Fader

    Hi!

    I'v used the Gradual Element Fader and it's working fine, except for one thing...

    I've used the script on a picture, which I also have used Hotspot area in DW to link diffrent parts of the picture. The effect works fine on mouseroll over, but when the mouse is over a link it fades away... I want the picture to be completely visible, but I still want to be able to link diffrent parts of the image: http://magnanima.se/html/nya/forum.html

    Anyone have a solution? Thanks!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.

    The problem from what I can tell is that an image map overlays the image it's associated wtih (instead of being part of it), so the script thinks the two are separate. As a result, when you move the mouse over the image map, the script thinks you've actually moved the mouse out of the fading element and into another element, hence the fade out.

    Inside the .js file, try changing the function:

    Code:
    gradualFader.fadeinterface=function(obj, e, direction){
    	if (!this.isContained(obj, e)){
    		gradualFader.clearTimer(obj)
    		gradualFader.fadeupdown(obj, direction)
    	}
    }
    to:

    Code:
    gradualFader.fadeinterface=function(obj, e, direction){
    	var e=window.event || e
    	var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
    	if (!this.isContained(obj, e) && c.tagName!="AREA"){
    		gradualFader.clearTimer(obj)
    		gradualFader.fadeupdown(obj, direction)
    	}
    }
    to manually discount image maps within an image.
    DD Admin

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It works, thanks for taking the time to help me!

    //C

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
  •