You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

onbeforehide not being called Created Sep 26, 2009

This thread is solved

Views: 1709     Replies: 9     Last reply Oct 5, 2009  
You must login first before you can use this feature

noelw

Posts: 13

Registered:
Sep 26, 2009

onbeforehide not being called

Posted: Sep 26, 2009

First, this is a great tool set, and thanks for all your work on it.

I'm using tooltips, in a table similar to your example. However, I use the beforeshow event to highlight the row and expected to use the beforehide to remove it. This works fine unless another tooltip trigger is moused over, in which case the event is never called.

Can you suggest any way around this please?

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» onbeforehide not being called

Posted: Sep 26, 2009

Reply to: onbeforehide not being called, from noelw
ok. need to check this out. can you possibly show a demo page.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» onbeforehide not being called

Posted: Sep 26, 2009

Reply to: onbeforehide not being called, from noelw
ok. need to check this out. can you possibly show a demo page.

noelw

Posts: 13

Registered:
Sep 26, 2009

» » onbeforehide not being called

Posted: Sep 26, 2009

Reply to: » onbeforehide not being called, from tipiirai
I've uploaded a short example at http://accresonline.co.uk/tooltip.html.

Just mouseover the word close and the cell should be highlighted. Move up/down the next close and it's cell will also be highlighted.

If instead you move to the left, after about half a second, the cell highlighting is removed using the onbeforehide event.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» » » onbeforehide not being called

Posted: Sep 27, 2009

Reply to: » » onbeforehide not being called, from noelw
Your page says: "book what? Bed or Breakfast ? tooltip.html." Does not really help me out.

noelw

Posts: 13

Registered:
Sep 26, 2009

» » » » onbeforehide not being called

Posted: Sep 27, 2009

Reply to: » » » onbeforehide not being called, from tipiirai
Sorry, for some reason there was a full stop on the end of the pasted url. Removing it, as inhttp://accresonline.co.uk/tooltip.html shows the correct page.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» » » » » onbeforehide not being called

Posted: Oct 2, 2009

Reply to: » » » » onbeforehide not being called, from noelw
the event is really called but the this.getTrigger() propably returns a wrong element. A workaround on your setup will be


onBeforeHide : function (){
   $('th.area a').removeClass('message')
}

noelw

Posts: 13

Registered:
Sep 26, 2009

» » » » » » onbeforehide not being called

Posted: Oct 2, 2009

Reply to: » » » » » onbeforehide not being called, from tipiirai
Thanks Tero. I've done exactly that to get it working, but hopefully in the future the notification could provide the correct element, as it's always possible there may be others with a 'message' class that I wouldn't want to clear.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» » » » » » » onbeforehide not being called

Posted: Oct 5, 2009

Reply to: » » » » » » onbeforehide not being called, from noelw
Try with this development version and see how it behaves.

http://piimaa.info/js/tools/tools.tooltip-1.1.2.min.js

noelw

Posts: 13

Registered:
Sep 26, 2009

» » » » » » » » onbeforehide not being called

Posted: Oct 5, 2009

Reply to: » » » » » » » onbeforehide not being called, from tipiirai
Thanks Tero and Ive given it a try. Unfortunately, although beforeshow is now being called on each occasion, it's not passing the correct element in the trigger. Instead, it seems to always provide the first in the set of possible elements. I've updated by sample athttp://accresonline.co.uk/tooltip.html to show this. Now when you mouse over the close links it lists which is being shown or hidden. If you start at the bottom, a5, and move up, you get

Showing a5
Hiding a1
Showing a4
Hiding a4

where the second line should be hiding a5.