|
[Solved] [Solved] Troubles with hiding Qtip on click+unfocus
|
|
5th February, 02:57
Post: #1
|
|||
|
|||
|
[Solved] [Solved] Troubles with hiding Qtip on click+unfocus
I'm not sure if this a bug or maybe I'm doing something wrong (My JS skills are weak) but the problem I'm experiencing is that I'd like to have images which when clicked show the Qtip and when the user clicks the image or any area of the browser window the Qtip becomes hidden.
The problem is that when I click the image when the Qtip is being shown the Qtip hides for only a brief moment and then reappears. JAVASCRIPT Code
|
|||
|
6th February, 17:58
Post: #2
|
|||
|
|||
|
RE: Troubles with hiding Qtip on click+unfocus
Try removing click from the hide event and just use unfocus
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
6th February, 19:30
(This post was last modified: 6th February 19:32 by walker2238.)
Post: #3
|
|||
|
|||
|
RE: Troubles with hiding Qtip on click+unfocus
Hey Craig,
I've tried that with the same result. If I click anywhere except the selector element than everything works fine. But when clicking the selector element with Qtip shown Qtip closes for a brief moment then reappears. I should also mention that the reason I use click and unfocus is because I saw another forum post in which this did indeed create the desired outcome. However I do remember the example wasn't using an ajax call, so could this be a bug? Also not sure if it helps but I'm testing this in FF9 and Chromium. |
|||
|
6th February, 20:44
Post: #4
|
|||
|
|||
|
RE: Troubles with hiding Qtip on click+unfocus
Please setup a test case: http://jsfiddle.net/fdavn/
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
7th February, 00:34
(This post was last modified: 7th February 01:07 by walker2238.)
Post: #5
|
|||
|
|||
|
RE: Troubles with hiding Qtip on click+unfocus
I've set up a quick example but it's just a copy of my localhost (Drupal 7) so a lot of things might be messed up.
I've narrowed down the issue I believe. When I use an anchor with a text title it seems that Qtip behaves. The problem and my user case is that using an image instead of the text causes this. http://jsfiddle.net/fDavN/2626/ |
|||
|
7th February, 17:09
Post: #6
|
|||
|
|||
|
RE: Troubles with hiding Qtip on click+unfocus
You're applying it to the <a> element which has different dimensions than the image itself. Make the image a block element using "display: block;" as by default it's inline and hence has line-spacing. http://jsfiddle.net/fDavN/2631/
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
7th February, 18:57
Post: #7
|
|||
|
|||
RE: Troubles with hiding Qtip on click+unfocus
(7th February 17:09)Craig Wrote: You're applying it to the <a> element which has different dimensions than the image itself. Make the image a block element using "display: block;" as by default it's inline and hence has line-spacing. http://jsfiddle.net/fDavN/2631/ I'm not sure I understand. The second example (Just the link without an image) was just to show the desired effect. You'll notice that for that link when the Qtip is shown that you can hide it by clicking either the link or anywhere else on the page. But you'll notice that with the image nested in the link that when you click the image itself to hide it it flickers. The recommended styling you gave doesn't fix this. |
|||
|
7th February, 19:32
Post: #8
|
|||
|
|||
|
RE: [Solved] Troubles with hiding Qtip on click+unfocus
Ah my bad sorry, wasn't paying attention to the thread title when I wrote that. This is actually a bug in the unfocus code, try the jsFiddle link now with the latest code (clear cache) and it should work.
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
7th February, 23:40
Post: #9
|
|||
|
|||
| RE: [Solved] Troubles with hiding Qtip on click+unfocus | |||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help




