السلام عليكم ورحمة الله وبركاته
لحركة القائمة
هذ الكود يوضع في head وغير ما يلزم
//من هنا تستطيع تغيير خصائص القائمة من خطوط واحجام ووضع النص وغير ذلك
<style>
<!--
.skin0 {
position:absolute;
text-align:left;
width:100px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}
.skin1 {
cursor:default;
font:menutext;
position:absolute;
text-align:right;
font-family: "MS Sans Serif";
font-size: 8pt;
width:100px;
background-color:menu;
border:1 solid buttonface;
visibility:hidden;
border:3 outset buttonhighlight;
}
.menuitems {
padding-left:15px;
padding-right:10px;
}
-->
</style>
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
var menuskin = "skin1"; // skin0, or skin1
var display_url = 0; // Show URLs in status bar?
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
return false;
}
function hidemenuie5() {
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
if (display_url)
window.status = event.srcElement.url;
}
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
window.status = "";
}
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
}
}
// End -->
</script>
هذ الكود يوضع في body وغير ما يلزم
//هنا ضع روابطك وجملها
<div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();">
<div class="menuitems" url="http://xxxx1xxxx.com">نص الرابطة 1</div>
<div class="menuitems" url="http://xxxx2xxxx.com">نص الرابطة 2</div>
<hr>
<div class="menuitems" url="http://xxxx3xxxx.com">نص الرابطة 3</div>
<div class="menuitems" url="http://xxxx4xxxx.com">نص الرابطة 4</div>
<hr>
<div class="menuitems" url="http://xxxx5xxxx.com">نص الرابطة 5</div>
<div class="menuitems" url="http://xxxx6xxxx.com">نص الرابطة 6</div>
</div>
<script language="JavaScript1.2">
if (document.all && window.print) {
ie5menu.className = menuskin;
document.oncontextmenu = showmenuie5;
document.body.onclick = hidemenuie5;
}
</script>
استبدل http://xxxxXxxxxx.com بالعنوان المطلوب
وإذا اردت ان تزيد في القائمة فقط كرر التالي
<div class="menuitems" url="http://xxxxXxxxxx.com">نص الرابطة </div>
وغير ما يلزم
=================================
بالنسبة للحركة الخاصة بالماوس
هذ الكود يوضع في head
<STYLE TYPE="text/css">
<!--
BODY {OVERFLOW:scroll;OVERFLOW-X:hidden}
.DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
//-->
</STYLE>
وهذا يوضع في الـ body
<DIV ID="dek" CLASS="dek"></DIV>
<SCRIPT TYPE="text/javascript">
<!--
Xoffset=-60; // modify these values to ...
Yoffset= 20; // change the popup position.
var nav,old,iex=(document.all),yyy=-1000;
if(navigator.appName=="Netscape"){(document.layers)?nav=true
ld=true;}
if(!old){
var skn=(nav)?document.dek:dek.style;
if(nav)document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=get_mouse;
}
function popup(msg,bak){
var content="<TABLE WIDTH=200 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=white SIZE=4>"+msg+"</FONT></TD></TABLE>";
if(old){alert(msg);return;}
else{yyy=Yoffset;
if(nav){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(iex){document.all("dek").innerHTML=content;skn.visibility="visible"}
}
}
function get_mouse(e){
var x=(nav)?e.pageX:event.x+document.body.scrollLeft;skn.left=x+Xoffset;
var y=(nav)?e.pageY:event.y+document.body.scrollTop;skn.top=y+yyy;
}
function kill(){
if(!old){yyy=-1000;skn.visibility="hidden";}
}
//-->
</SCRIPT>
اما هذه العبارة فتوضع داخل قوسي عنوان الرابطة وذلك بعد علامة التنصيص الاخيره قبل القوس
ONMOUSEOVER="popup('BCD EFGH IJKL','BLUE')"; ONMOUSEOUT="kill()"
حيث :
BCD EFGH IJKL : الوصف الذي سيظهر في المربع
BLUE : لون خلفية المربع
بهذا الشكل مثلا
<a href="http://www.alqafelah.com" ONMOUSEOUT="kill()" ; ONMOUSEOVER="popup('زورونا تجدوا ما يسركم','blue')">القافلة</a>
زر موقعي القديم والذي سأقوم بتجديده قريباً بإذن الله وستجد فيه ما يسرك من هذه الأمور ...
http://myjava.cjb.net
تحياتي
__________________
سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك