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

· 10년 전 · 1451

<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년 전 조회 1,448
10년 전 조회 1,427
10년 전 조회 1,494
10년 전 조회 1,559
10년 전 조회 2,028
10년 전 조회 1,614
10년 전 조회 1,472
10년 전 조회 1,369
10년 전 조회 1,399
10년 전 조회 1,508
10년 전 조회 1,450
10년 전 조회 1,501
10년 전 조회 1,401
10년 전 조회 1,550
10년 전 조회 1,421
10년 전 조회 1,393
10년 전 조회 1,342
10년 전 조회 2,006
10년 전 조회 1,511
10년 전 조회 1,402
10년 전 조회 1,426
10년 전 조회 1,416
10년 전 조회 1,432
10년 전 조회 1,414
10년 전 조회 1,923
10년 전 조회 1,383
10년 전 조회 1,441
10년 전 조회 1,316
10년 전 조회 1,916
10년 전 조회 1,500
10년 전 조회 1,496
10년 전 조회 1,541
10년 전 조회 1,471
10년 전 조회 1,490
10년 전 조회 1,416
10년 전 조회 1,313
10년 전 조회 1,440
10년 전 조회 1,307
10년 전 조회 1,680
10년 전 조회 1,375
10년 전 조회 1,382
10년 전 조회 1,369
10년 전 조회 1,389
10년 전 조회 1,458
10년 전 조회 1,354
10년 전 조회 1,392
10년 전 조회 1,577
10년 전 조회 1,369
10년 전 조회 1,473
10년 전 조회 1,452
10년 전 조회 1,477
10년 전 조회 1,623
10년 전 조회 1,459
10년 전 조회 1,461
10년 전 조회 1,441
10년 전 조회 1,550
10년 전 조회 1,459
10년 전 조회 1,421
10년 전 조회 1,422
10년 전 조회 1,444
10년 전 조회 1,481
10년 전 조회 1,424
10년 전 조회 1,625
10년 전 조회 1,778
10년 전 조회 1,694
10년 전 조회 1,459
10년 전 조회 1,453
10년 전 조회 1,417
10년 전 조회 1,404
10년 전 조회 1,502
10년 전 조회 1,425
10년 전 조회 1,373
10년 전 조회 1,435
10년 전 조회 1,783
10년 전 조회 2,245
10년 전 조회 1,820
10년 전 조회 1,617
10년 전 조회 1,489
10년 전 조회 1,460
10년 전 조회 1,472
10년 전 조회 1,438
10년 전 조회 1,451
10년 전 조회 1,462
10년 전 조회 1,629
10년 전 조회 1,528
10년 전 조회 2,277
10년 전 조회 1,803
10년 전 조회 1,552
10년 전 조회 1,645
10년 전 조회 1,866
10년 전 조회 1,546
10년 전 조회 1,756
10년 전 조회 1,585
10년 전 조회 1,709
10년 전 조회 1,546
10년 전 조회 1,496
10년 전 조회 1,490
10년 전 조회 1,552
10년 전 조회 1,524
10년 전 조회 1,577