ddlevelsmenu在IE6下,与select冲突的解决办法【整理】

原讨论贴:http://topic.csdn.net/u/20090511/11/d176e9da-7b96-4197-abc1-cf02ccbe1982.html

ddlevelsmenu感觉还是比较好用的,但是在万恶的IE6下面还是会出现不少问题,其中一个就是:
与<select>标签会有冲突,子菜单无法弹出,google一下,发现一个解决办法。


在ddlevelsmenu.js 里有一句 ddlevelsmenu.positionshim(this, submenu, dir, scrollX, scrollY) ,将里面两行代码注释掉即可:

ContractedBlock.gif ExpandedBlockStart.gif Code
positionshim:function(header, submenu, dir, scrollX, scrollY){
    
//alert(dir)
    if (header._istoplevel){
        
var scrollY=window.pageYOffset? window.pageYOffset : this.standardbody.scrollTop
        
var topgap=header._offsets.top-scrollY
        
var bottomgap=scrollY+this.docheight-header._offsets.top-header._dimensions.h
        
if (topgap>0){
            
this.shimmy.topshim.style.left=scrollX+"px"
            
this.shimmy.topshim.style.top=scrollY+"px"
            
this.shimmy.topshim.style.width="99%"
            
//this.shimmy.topshim.style.height=topgap+"px" //distance from top window edge to top of menu item
        }
        
if (bottomgap>0){
            
this.shimmy.bottomshim.style.left=scrollX+"px"
            
this.shimmy.bottomshim.style.top=header._offsets.top + header._dimensions.h +"px"
            
this.shimmy.bottomshim.style.width="99%"
            
//this.shimmy.bottomshim.style.height=bottomgap+"px" //distance from bottom of menu item to bottom window edge
        }
    }
}


子菜单无法弹出的问题解决,但是IE6下DIV无法盖住SELECT的Bug会出现,还好,这个bug还在可接受范围之内。
上了ddlevelsmenu菜单的贼船,只有认了。

 

转载于:https://www.cnblogs.com/stu-acer/archive/2009/06/24/1510440.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值