var tabdropdown={ disappeardelay: 200, //set delay in miliseconds before menu disappears onmouseout disablemenuclick: false, //when user clicks on a menu item with a drop down menu, disable menu item's link? enableiframeshim: 1, //1 or 0, for true or false //No need to edit beyond here//////////////////////// dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all, previousmenuitem:null, currentpageurl: window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, ""), //get current page url (minus hostname, ie: http://www.dynamicdrive.com/) 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, obj2){ //obj refers to drop down menu, obj2 refers to tab menu item mouse is currently over if (this.ie || this.firefox) this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px" if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover"){ if (obj2.parentNode.className.indexOf("default")==-1) //if tab isn't a default selected one obj2.parentNode.className="selected" obj.visibility="visible" } else if (e.type=="click") obj.visibility="hidden"
- 1
- 粉丝: 117
- 资源: 268
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助