views:

14

answers:

1
  1. How do I turn off the tips temporarily? I see the ability referenced on the website a couple times, and in this forum as well, but for some reason I can't find the command that turns them off. I just need to disable them for a bit, then re-enable them.

  2. Is there a way to give a tooltip a maximum height? I have a bunch of tooltips, some of which are only one line, some are 100 lines. I'd like to have the one line tooltips pop up very small, and the large ones pop up large, with a scrollbar for the really large ones.

Thanks.

Edit: Sorry, not sure why I assumed everyone would know exactly what I was talking about.

http://plugins.learningjquery.com/cluetip/

Edit 2: I've gotten the maximum height thing working. My problem was trying to implement it using the cluetip interface. All I needed to do was specify some CSS to do the deed. Still having trouble disabling the tips, though. Seems like it should be simple, not sure why I can't figure this out!

+1  A: 
  1. Yes you can, take a look here: http://plugins.jquery.com/node/8405#comment-3532 it basically means to insert cluetip call into your source element's 'hover' (or anything else) event handler and evaluate a condition before calling cluetip...

  2. You can set up a fixed height, or an 'auto' height. If you want to have that effect you should modify the plugin code itself.

EDITED AFTER YOUR COMMENT:

Clearer now, Things change a bit:

You have to set a global flag, a boolean that is set to true every time a tip is shown (you can set it in the onActivate callback) then...

You have to use the function which I've linked to, to check whether the flag is set to true, if it's not then you can show your tip, anyway...

Don't forget to set back your flag to false when the tip is closed. The best way to do it is by inserting an 'onClose' callback in the plugin code (line 352, clueTipClose()).

If all this todo stuff seems a pain in the..., well, I think it is. Take a look at SimpleTip http://craigsworks.com/projects/simpletip/ , which has everything you need.

mamoo
Hmmm...either I'm not understanding this link, or I explained myself poorly. I want to activate all cluetips when I load the page. Then, when the user clicks on something, I want to deactivate all cluetips until they click on that same thing again. When I read your link, it seems like it is just for activating cluetips on user action, but still doesn't say anything about disabling them. Did I miss something?
SenorPuerco
I've edited my response, hope it's clearer now ;)
mamoo
Yep, that will work. Thanks for the help. For now I'll stick with ClueTip since I'm elbow deep already. But I'll certainly look at SimpleTip in the future.
SenorPuerco