解決済み
http://jsfiddle.net/rwone/89P9m/
コード
$(".magic").each(function() {
var hiddenDiv = $(this).find(".hidden_db_data_div"),
parentElement = $(this),
api = {};
api.isOpen = false;
api.timeout = null;
api.position = function(){
hiddenDiv.css({
"top": parentElement.offset().top - $("#wrapper").offset().top - 50,
"left": parentElement.offset().left - $("#wrapper").offset().left +20
});
}
api.resetTimeout = function(){
clearTimeout( api.timeout );
}
api.startShowing = function(){
api.resetTimeout();
api.timeout = setTimeout(function(){
api.show();
},300);
}
api.startHiding = function(){
api.resetTimeout();
api.timeout = setTimeout(function(){
api.hide();
},150);
}
api.show= function(){
if(!api.isOpen){
api.position();
hiddenDiv .fadeIn(500);
api.isOpen = true;
$("#isotope_container").bind("scroll.hiddendiv",api.position);
}
}
api.hide = function(){
if( api.isOpen ) {
api.isOpen = false;
$("#isotope_container").unbind("scroll.hiddendiv");
hiddenDiv.fadeOut(100);
}
}
hiddenDiv.bind("mouseenter", function() {
api.resetTimeout();
}).bind("mouseleave", function() {
api.startHiding();
}).css("z-index", 100).appendTo("#wrapper");
$(this).data("hiddenApi",api );
}).bind("mouseenter", function() {
var api = $(this).data("hiddenApi");
api.startShowing();
}).bind("mouseleave", function() { // start closing timeout once mouse leaves isotope element
var api = $(this).data("hiddenApi");
api.startHiding();
});