Problem with hover function
My problem can be viewed here:
http://www.ohauge.net/work/eiriktvilde/index.php?p=gallery
When I hover my mouse away from the project image (over the title), things get buggy. I know why it happens, I just don't know how to fix it.
here is the code I am using for this part:
- /**
* Display the project title when
* mouse is hovered over corresponding
* gallery image. (useless, but cool)
*/
function displayTitle() {
var img = $('img.gallery-img');
img.hover(function() {
var p = $(this).position();
$(this).siblings().css({
'top': p.top,
'left': p.left
});
$(this).siblings().show();
}, function() {
$(this).siblings().hide();
});
}