Results 1 to 2 of 2

Thread: Sticky Tooltip script

  1. #1
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sticky Tooltip script

    I used the "Sticky Tooltip script" ( http://www.dynamicdrive.com/dynamici...ckytooltip.htm )
    with <area> tag inside an image-map.

    How to change the border color (red) of the box in sticky position (after click right) ?

    In the file "stickytooltip.js", I changed the darkred color (parameter "stickybordercolors"). It only changes the background color of "Click outside this box to hide it" , but not the border color.

    Thank you.
    Last edited by jscheuer1; 12-16-2010 at 04:47 PM. Reason: fix broken link

  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

    This script is full of, I don't know what to call them, I guess 'issues' would be about as good as any.

    To fix this particular issue, find:

    Code:
    	hidebox:function($, $tooltip){
    		if (!this.isdocked){
    			$tooltip.stop(false, true).hide()
    			$tooltip.css({borderColor:'black'}).find('.stickystatus:eq(0)').css({background:this.stickybordercolors[0]}).html(this.stickynotice1)
    		}
    	},
    
    	docktooltip:function($, $tooltip, e){
    		this.isdocked=true
    		$tooltip.css({borderColor:'darkred'}).find('.stickystatus:eq(0)').css({background:this.stickybordercolors[1]}).html(this.stickynotice2)
    	},
    and change the highlighted as shown:

    Code:
    	hidebox:function($, $tooltip){
    		if (!this.isdocked){
    			$tooltip.stop(false, true).hide()
    			$tooltip.css({borderColor:this.stickybordercolors[0]}).find('.stickystatus:eq(0)').css({background:this.stickybordercolors[0]}).html(this.stickynotice1)
    		}
    	},
    
    	docktooltip:function($, $tooltip, e){
    		this.isdocked=true;
    		if(this.stickykillclicks){
    			$('body').bind('click', this.killclicks);
    		}
    		$tooltip.css({borderColor:this.stickybordercolors[1]}).find('.stickystatus:eq(0)').css({background:this.stickybordercolors[1]}).html(this.stickynotice2)
    	},
    I have a blog entry on this script where I have other modifications to deal with the various other issues that have so far been identified. I updated it to include this fix. It's located at:

    http://www.dynamicdrive.com/forums/blog.php?b=48

    I strongly recommend that you use its script instead. That way you need not modify your current version.
    - John
    ________________________

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

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
  •