|
|
//e :要鼠标滑对象,me:弹出相对对象位置;BPx :向下偏移量;DTime:效果显示时间
|
|
|
//更新 --ycc 2010-01-08
|
|
|
///e :要鼠标滑对象,me:弹出相对对象位置;BPx :向下偏移量;DTime:效果显示时间
|
|
|
///e :要鼠标滑对象,me:弹出相对对象位置;BPx :向下偏移量;DTime:效果显示时间
|
|
|
function OverShowMenu(e,me,BPx,LPx,DTime)
|
|
|
{
|
|
|
if(typeof e != "string") return;
|
|
|
if(typeof me != "string") return;
|
|
|
if(typeof BPx != "number") BPx = 10;
|
|
|
if(typeof LPx != "number") LPx = 10;
|
|
|
if(typeof DTime != "number") DTime = 0;
|
|
|
if(typeof $=="function")
|
|
|
{
|
|
|
$(function(){
|
|
|
function _Over(e,me)
|
|
|
{
|
|
|
|
|
|
var ele = $("#"+e),eofs = ele.offset(),ePx = -( ele.innerHeight()+BPx) ,she,TimeOutSpan;
|
|
|
ele.hover(function(){
|
|
|
if(!document.getElementById(me+"keep"))
|
|
|
{
|
|
|
|
|
|
$("body").prepend("<div class='alltourList' style='z-index:1000002;position:absolute;top:"+(eofs.top-ePx)+"px;left:"+(eofs.left -LPx)+"px;' id='"+me+"keep'>"+ $("#"+me).html()+"</div>");
|
|
|
she = $("#"+me+"keep") ;
|
|
|
she.hover(function(){if(TimeOutSpan)clearTimeout(TimeOutSpan);},function(){TimeOutSpan = setTimeout(she.hide(DTime),600);});
|
|
|
}
|
|
|
|
|
|
if(TimeOutSpan)clearTimeout(TimeOutSpan);
|
|
|
she.show();
|
|
|
},function(){
|
|
|
TimeOutSpan = setTimeout(function(){she.hide(DTime)},600);
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
_Over(e,me);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
//OverShowMenu("textMenu","textBox",0,0,700);
|
|
|
//OverShowMenu("textMenu2","textBox2",0,0,700);
|
|
|
/*
|
|
|
|
|
|
调用例子
|
|
|
OverShowMenu("NAV_ChinaTravelGuide","BOX_ChinaTravelGuide",-305);
|
|
|
<a href="/travelguide/" class="moreCatagory" id="NAV_ChinaTravelGuide" >China Travel Guide</a>
|
|
|
<div class="alltourList" id="BOX_ChinaTravelGuide" style="display: none">
|
|
|
<ul>
|
|
|
<li><a href="#">xxxxxx</a></li>
|
|
|
<li><a href="#">xxxxxx</a></li>
|
|
|
</ul>
|
|
|
<div class="clear"></div>
|
|
|
</div>
|
|
|
*/ |