Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Avoid to hide while hover the tip
4th November, 19:18
Post: #1
Avoid to hide while hover the tip
Hi!

first of all thanks for your efforts coding this great plugin for jquery, you really rocks!

I have a problem that I don't know how to solve, I have a list of LI elements, and when you mouseover a LI a tooltip is shown just a few pixels over the mouse (y:20) but when the tooltip is completely visible the mouse become over the tooltip and the mouseout event is fired. Then it enters a funny (but innecesary for me) bucle of show-hide-show.

Here is my code:

JS Code
$("#llistat a[title]").qtip({
            prerender:true,
            tip: true,
            show: {
               when: {
                  event: "mouseover"
               },
               effect: {
                  type: "fade",
                  length: 500
               }
            },
                hide: {
               when: "mouseout",
               effect: {
                  type: "fade",
                  length: 250
               }
            },
            position: {
               corner: {
                  target: 'topMiddle',
                  tooltip: 'bottomMiddle'
               },
               adjust:{
                  y:20
               }
            },
            style: { 
               name:'dark',
               width: 170,
               height:100,
               border:0,
               padding:5,
               background:'transparent url(/img/globo.png) 0 0 no-repeat'
            }
         });


Hope you can understand my question.

Thanks again!
Marc
Find all posts by this user
Quote this message in a reply
11th November, 19:10
Post: #2
Avoid to hide while hover the tip
Here is a help image... please, I need to solve this problem for this week.

[Image: qTIP_HELP.png]

thanks all
Find all posts by this user
Quote this message in a reply
21st November, 18:54
Post: #3
Avoid to hide while hover the tip
There is nobody that can help me??
Find all posts by this user
Quote this message in a reply
22nd November, 23:56
Post: #4
Avoid to hide while hover the tip
palaueb, sorry for the late reply. Have you tried simply adjusting the tooltips position using the position.adjust.x and position.adjust.y properties?

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
9th December, 15:01
Post: #5
Avoid to hide while hover the tip
Hey palaueb,

I ran into this same problem today. Add this code to the root of your options:

JS Code
hide: false,
    api: {
      onRender: function() {
        var self = this;
        var overTarget = false;
        var overTip = false;
 
        this.elements.target.hover(function(){
          overTarget = true;
        },function(){
          overTarget = false;        
          setTimeout(function() {
            if(!overTarget && !overTip) {
              self .hide();
            }
          }, 100);
        });
 
        this.elements.contentWrapper.hover(function(){
          overTip = true;        
        },function(){        
          overTip = false;        
          setTimeout(function() {
            if(!overTarget && !overTip) {
              self .hide();
            }
          }, 100);
        });
      }
    }


Basically, you define two booleans, one for the target, and one for the tooltip, and initialize them to false. Then you define hover events for both the target and the tooltip. When you mouse over an element, change its corresponding boolean to true. When you mouse out an element, check to see if both booleans are false, if so, hide the tooltip.

I hope this helps / makes sense.

Ralph Holzmann

http://ralphholzmann.com/
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Multiple events for show/hide? garbledygook 2 1,848 16th November 19:38
Last Post: Craig
  Slide Effect on Show Hide ahofferth 1 1,335 11th July 15:56
Last Post: Craig
  show/hide "advanced" options wcmanes 14 6,323 20th October 00:37
Last Post: Craig
  Open a new tip on a tip close hari41980 3 1,739 31st August 11:49
Last Post: Craig



User(s) browsing this thread: 1 Guest(s)