full-down메뉴 자바스크립트 입니다.

· 10년 전 · 937

<script type="text/javascript">
<!--

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
 
//No need to edit beyond here////////////////////////
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all,
 
getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
 parentEl=parentEl.offsetParent;
}
return totaloffset;
},

showhide:function(obj, e, visible, hidden){
if (this.ie || this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
},

iecompattest:function(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
 },

clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
 this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
 edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
 var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
 this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
 edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
 edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden"
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e, "visible", "hidden")
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
 this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
 }
},

contains_firefox:function(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
},

dynamichide:function(e){
var evtobj=window.event? window.event : e
if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
 this.delayhidemenu()
},

delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'",this.disappeardelay)
 },

clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
}
}
//-->
</script>

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
10년 전 조회 922
10년 전 조회 927
10년 전 조회 921
10년 전 조회 1,071
10년 전 조회 1,494
10년 전 조회 1,165
10년 전 조회 947
10년 전 조회 844
10년 전 조회 922
10년 전 조회 990
10년 전 조회 908
10년 전 조회 980
10년 전 조회 881
10년 전 조회 1,056
10년 전 조회 913
10년 전 조회 878
10년 전 조회 851
10년 전 조회 1,495
10년 전 조회 986
10년 전 조회 935
10년 전 조회 936
10년 전 조회 944
10년 전 조회 940
10년 전 조회 968
10년 전 조회 1,429
10년 전 조회 886
10년 전 조회 939
10년 전 조회 840
10년 전 조회 1,418
10년 전 조회 1,069
10년 전 조회 1,060
10년 전 조회 1,128
10년 전 조회 1,075
10년 전 조회 1,023
10년 전 조회 997
10년 전 조회 816
10년 전 조회 949
10년 전 조회 842
10년 전 조회 1,143
10년 전 조회 882
10년 전 조회 854
10년 전 조회 883
10년 전 조회 908
10년 전 조회 964
10년 전 조회 870
10년 전 조회 915
10년 전 조회 1,052
10년 전 조회 923
10년 전 조회 972
10년 전 조회 938
10년 전 조회 981
10년 전 조회 1,087
10년 전 조회 954
10년 전 조회 927
10년 전 조회 956
10년 전 조회 1,050
10년 전 조회 960
10년 전 조회 912
10년 전 조회 936
10년 전 조회 950
10년 전 조회 885
10년 전 조회 895
10년 전 조회 1,192
10년 전 조회 1,269
10년 전 조회 1,231
10년 전 조회 918
10년 전 조회 934
10년 전 조회 895
10년 전 조회 921
10년 전 조회 1,018
10년 전 조회 964
10년 전 조회 858
10년 전 조회 915
10년 전 조회 1,303
10년 전 조회 1,737
10년 전 조회 1,305
10년 전 조회 1,120
10년 전 조회 1,202
10년 전 조회 951
10년 전 조회 932
10년 전 조회 966
10년 전 조회 927
10년 전 조회 953
10년 전 조회 947
10년 전 조회 1,209
10년 전 조회 1,057
10년 전 조회 1,741
10년 전 조회 1,323
10년 전 조회 1,020
10년 전 조회 1,126
10년 전 조회 1,343
10년 전 조회 1,089
10년 전 조회 1,252
10년 전 조회 1,084
10년 전 조회 1,194
10년 전 조회 1,019
10년 전 조회 1,004
10년 전 조회 998
10년 전 조회 1,059
10년 전 조회 1,030