Page 1 of 1

qtip2

Posted: Thu Jun 26, 2014 2:31 am
by srachit
Has anyone here used qtip2 in any of their projects? I'm trying to use it on my image map but it does not seem to work for some reason.

I took the code from here:
http://qtip2.com/plugins#imagemap

And tried to recreate it in my project, but for some reason it doesnt seem to work. My code is:

Code: Select all

$(document).ready(function(){
function info(txt, title) {
    alert("Hello");
    $('area').qtip({
        content: {
            text: 'Support for area maps with no extra configuration! Awesome.'
        },
    position: {
        my: 'top left',
        at: 'bottom right'
    }
});
}

function writeText(txt)
{
    $('#desc').text(txt);
}
 
$('#HD').mouseover(function(){
        var text = "This is a hard drive";
        var title = "Hard Drive";
        writeText(text);
        info(text, title);
});
    
$("#CPU").mouseover(function(){
    var text = "This is a CPU";
    var title = "CPU";
    writeText(text);
    info(text, title);
});
});
I know it enters the info function because the alert is called each time I go onto one of the image areas, but a qtip doesnt seem to come up

Re: qtip2

Posted: Fri Jun 27, 2014 1:43 pm
by hallsofvallhalla
Are you referencing the Qtip script properly? As in including it in your file and CSS file? If you hit f12 and got to console do you see any errors?

Re: qtip2

Posted: Sun Jun 29, 2014 11:10 pm
by srachit
Thats one of the major problems I am facing, when I check my javascript console on chrome no error ever pops up, so I'm completely clueless as to what is wrong

Re: qtip2

Posted: Mon Jun 30, 2014 9:16 pm
by Jackolantern
I would try adding some break points through either Chrome JS Console or Firebug (in FireFox), and just step through it to see where the code should be working and try to figure out where it is breaking down.