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);
});
});