Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Persistent qtip which appears on hover disappears only by clicking on an element
25th July, 09:28
Post: #1
Persistent qtip which appears on hover disappears only by clicking on an element
I am using qtip version 1.0.0-rc3 and have to solve the following problem :
I have a div element on which a qtip has to appear on hover. The div element has an anchor tag within it. When the user clicks on the link, I want the qtip to persist even when the mouse has moved out of the div. The qtip has to be hidden only when the use clicks on the link again or on some other link on the page[There are multiple such div's on the page].
The HTML has the following structure :

<div><a>Name</a><div>

I've tried using
hide : 'unfocus', but this does not serve the purpose.
Basically, I need a way to control how my qtip is hidden.
Find all posts by this user
Quote this message in a reply
25th July, 11:51
Post: #2
RE: Persistent qtip which appears on hover disappears only by clicking on an element
This sounds almost exactly like what unfocus is needed for Tongue What did that do that you didn't want it to?

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
26th July, 08:01
Post: #3
RE: Persistent qtip which appears on hover disappears only by clicking on an element
Here's the code I'm using
JS Code
$calEvent.qtip({
                content: self._getQtipContent(calEvent),
                position: {
                    viewport: $(window),
                    corner: {
                        target: "topMiddle",
                        tooltip: "bottomMiddle"
                    },
                    adjust: {
                        screen: true
                    }
                },
                show: {
                    solo: true,
                    when: {
                        event: 'click',
                        target: $calEvent.find("a")
                    }
                },
                hide: 'unfocus',
                style: {
                    border: {
                        radius: 5,
                        color: "#ccc"
                    },
                    tip: {
                        corner: "bottomMiddle",
                        color: "#ccc",
                        size: {
                            x: 15,
                            y: 8
                        }
                    }
                }
            })


The tooltip appears when I click on the link and disappears when I click on the link itself or any other link on the page, which is fine.
However, I want the qtip to appear on hover as well. The click on the link should "lock" the qtip in its position until the link is clicked on again.
The flow should be as follows:

- Hover over the div => qtip appears
- If link within the div is clicked => lock qtip and remove it when link is clicked again or any other link is clicked.
- Hover out of the div => if link was clicked, persist qtip or else hide the qtip.

Thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Solved] Hover text and AJAX content gottihh 2 92 10th May 07:24
Last Post: gottihh
  [Solved] Dynamic Content From Page Element frogg3862 2 89 3rd May 17:12
Last Post: frogg3862
  calling .html using the element id matthearn 0 308 24th February 15:08
Last Post: matthearn
  [Solved] Attach QTIP to any element with attribute "tooltip" slhilbert 7 402 15th February 14:44
Last Post: slhilbert
  [Solved] How to append QTip to some other element instead of document body prateekbansal 2 496 11th January 07:01
Last Post: prateekbansal
  [Solved] QTip content from existing div element on page? dcash 4 2,519 8th December 18:29
Last Post: Craig
  [Solved] ajax data request on hover settoloki 0 482 30th November 08:42
Last Post: settoloki
  nested lists and qtip for the last mouseenter element ??? thbenda 0 339 4th October 09:24
Last Post: thbenda
  [Solved] Ajax element width trogo 1 860 27th September 12:37
Last Post: Craig
  No fade effect the first time the tip appears lazyeye73 3 1,587 23rd September 00:38
Last Post: mawaldne



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