⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 infobox_collection.js

📁 php网页设计
💻 JS
字号:
/* *  Infobox.js *  Part of ResourceSpace *  Displays an information box when the user hovers over resource results. * *--------------------------------------------------------------------------*/var InfoBoxWaiting=false;var InfoBoxVisible=false;var InfoBoxRef=0;var InfoBoxTop=0;var InfoBoxLeft=0;function InfoBoxMM(event)    {   	var i=$('InfoBoxCollection');   	if (!i) {return false;} // no object? ignore for now   	   	var ii=$('InfoBoxCollectionInner');    var x=event.clientX;    var y=event.clientY;        var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body	var dsocleft=document.all? iebody.scrollLeft : pageXOffset	var dsoctop=document.all? iebody.scrollTop : pageYOffset     	i.style.display='none';            InfoBoxTop=dsoctop + y - 25;    if (InfoBoxTop<5) {InfoBoxTop=5;}        InfoBoxLeft=dsocleft + x + 10;    	// Set up the box background / shadow    // move the box higher up if the cursor is low enough to support this.    if (x>400)    	{    	InfoBoxLeft-=396;   		i.style.backgroundImage="url('gfx/interface/infobox_left.png')";   		ii.style.marginLeft="15px";   		ii.style.marginRight="50px";    	}	else		{		i.style.backgroundImage="url('gfx/interface/infobox_right.png')";   		ii.style.marginLeft="50px";  		ii.style.marginRight="15px";		}	// set a timer for the infobox to appear    if ((InfoBoxRef!=0) && (InfoBoxWaiting==false))    	{		window.setTimeout('InfoBoxAppear()',1200);	    InfoBoxWaiting=true;		}    }function InfoBoxSetResource(ref)	{	InfoBoxRef=ref;	}	function InfoBoxAppear()	{	// Make sure we are still waiting for a box to appear and that the mouse has not yet moved.	if ((InfoBoxWaiting) && (InfoBoxRef!=0))		{		var i=$('InfoBoxCollection');    	//Ajax loader here    	$('InfoBoxCollectionInner').innerHTML='';    	new Ajax.Updater('InfoBoxCollectionInner','infobox_loader.php?ref=' + InfoBoxRef,{ method: 'get' });	   	i.style.display='block';        new Effect.Opacity('InfoBoxCollection', {duration:0.3, from:1, to:0.8});	   		    i.style.top=InfoBoxTop + "px";    	i.style.left=InfoBoxLeft + "px";    	    	}    InfoBoxWaiting=false;	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -