Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Jquery qtip mousehover
10th February, 20:41 (This post was last modified: 10th February 20:43 by Dodi.)
Post: #1
Jquery qtip mousehover
Hi!
I have a simple map picture, and I want create a qtip popup, if I hover the citys.
Code sample:

JS Code
$('#map').mousemove(function(e){
    var x = e.pageX - this.offsetLeft;
    var y = e.pageY - this.offsetTop;
    if (169<x && x<188 && 262<y && y<283)
    {
        $(this).qtip(
  {
     content: {
        // Set the text to an image HTML string with the correct src URL to the loading image you want to use
        text: 'asdsadadasdsa',
        url: $(this).attr('rel'), // Use the rel attribute of each element for the url to load
        title: {
           text: 'city1 '
        }
     },
     position: {
        corner: {
           target: 'bottomMiddle', // Position the tooltip above the link
           tooltip: 'topMiddle'
        },
        adjust: {
           screen: false // Keep the tooltip on-screen at all times
        }
     },
     show: {
        when: 'mousemove',
        solo: true // Only show one tooltip at a time
     },
     hide: 'unfocus',
     style: {
        tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
        border: {
           width: 0,
           radius: 4
        },
        name: 'blue', // Use the default blue style
        width: 570 // Set the tooltip width
     }
  });
}


Hover works fine, but if I once mouse hovered and moved to the empty area, the popup showed up again. I tried else statement with destroy method, but its not helped.
Find all posts by this user
Quote this message in a reply
11th February, 18:37
Post: #2
RE: Jquery qtip mousehover
I'm not sure I understand the problem, can you elaborate a bit please?

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
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  the plugin do not work correctly with jquery 1.7? vic906 1 145 12th April 22:09
Last Post: Craig
  Qtips with jquery UI Issue sherwoodbear79 2 432 15th February 15:36
Last Post: sherwoodbear79
  [Solved] Need some help:codes in Jquery BabyShung 1 338 29th January 16:35
Last Post: Craig
  Tooltips not loading jQuery or other js files from parent document crodesign 2 474 13th January 22:19
Last Post: crodesign
  qtip with jquery mobile tap event finedesignz 1 642 4th January 21:18
Last Post: Craig
  qtip inside the jquery UI Dialog tiggi 1 780 20th October 18:49
Last Post: Craig
  Google Calendar like bubble for Jquery FullCalendar tdmohr 13 13,002 18th October 07:22
Last Post: jokepondy
  Cannot make jquery plugin or qtip plugin work anindasen 3 983 8th October 13:49
Last Post: Craig
  On jQuery 1.5.1, tips don't appear in IE7 or IE8 panabee 3 1,432 23rd May 17:51
Last Post: Craig
  [Solved] Does 1.x Work with jQuery 1.4.2? bocaj 10 7,562 1st March 15:28
Last Post: Craig



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