jquery ie8下 show()方法失效

sunscx102 2011-10-28 02:16:51
各位前辈帮帮忙,刚接的项目,客户要求做点效果,但是浏览器要用IE8,美工已经把页面画好了,基本都是用table布局的,有一个工具版的table,一开始是隐藏的,点击一个按钮后弹出,我想加一个动画效果,但是用show方法后页面没有反映,代码如下:

<div class="center_border">
<table width="100%" border="0" cellpadding="0" cellspacing="0" valign="top" >
<tr>
<td valign="top" id="hoarymenu" style="display:none">
<table style="width:250px;" border="0" cellpadding="0" cellspacing="0" valign="top" >
<tr>
<td valign="top"><img src="ESMS_border_images/menu_bg_1.gif" width="6" height="15" /></td>
<td valign="top" class="menu_bg_1" width="100%"height="15"> </td>
<td valign="top" height="6"><img src="ESMS_border_images/menu_bg_2.gif" width="11" height="15" /></td>
</tr>
<tr>
<td class="menu_bg_3"> </td>
<td class="menu_bg_2">
<table border="0" cellpadding="0" cellspacing="0" valign="top" id="toolmenu">
<tr>
<td>
<strong class="menu_title">
工具面板
<a href="Redact_Tool.html" title="请选择工具" rel="gb_page_center[600, 200]"> <img src="ESMS_border_images/fatcow_240.gif" width="16" height="16" class="gjmb_img" /></a>
</strong>

</td>
</tr>
<tr>
<td id="ul">

<a href="#"><img src="ESMS_border_images/menu_khgl.gif" width="93" height="82" class="menu_img" /></a>

<a href="Customer_contractList.html" target="mainFrame"><img src="ESMS_border_images/menu_htgl.gif" width="93" height="82" class="menu_img" /></a>
<a href="#"><img src="ESMS_border_images/menu_khlxr.gif" width="93" height="82" class="menu_img" /></a>
<a href="#"><img src="ESMS_border_images/menu_xmlb.gif" width="93" height="82" class="menu_img" /></a>
<a href="#"><img src="ESMS_border_images/menu_mail.gif" width="93" height="82" class="menu_img" /></a>
<a href="#"><img src="ESMS_border_images/menu_jsb.gif" width="93" height="82" class="menu_img" /></a>
</td>
</tr>
</table>
</td>
<td class="menu_bg_4"> </td>
</tr>
<tr>
<td valign="top" width="0"><img src="ESMS_border_images/menu_bg_6.gif" width="6" height="11" /></td>
<td valign="top" class="menu_bg_5" width="100%" ></td>
<td valign="top"><img src="ESMS_border_images/menu_bg_8.gif" width="11" height="11" /></td>
</tr>
</table>
</td>
<td>
<div id="top-nav" style=" margin:250px auto; " > <span style="cursor:pointer" id="p1" onclick="menu.showmenu_tool()" > <img src="ESMS_border_images/left.gif" height="15px" width="15px" title="隐藏menu" /></span></div>
</td>
<td valign="top" width="100%" >
<div class="iframe_border">
<iframe src="Customer_manage.html" id="border_iframe" width="100%" height="100%" onload="this.length=250" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes" name="mainFrame">

</iframe>
</div>
</td>
</tr>
</table>
</div>

红色部分为弹出菜单的那个id

下面是JS,open是一个全局变量,用来标记菜单面板是打开的还是关闭的

showmenu_tool:function(){

if(open==0){
jQuery("#hoarymenu").show("slow");
open=1;
}else if(open==1){
jQuery("#hoarymenu").animate({height: 'toggle', opacity: 'toggle'}, "slow");
open=0;
}



}

求各位前辈帮帮小弟忙
...全文
564 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
sunscx102 2011-10-28
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 sunscx102 的回复:]

引用 8 楼 liangws 的回复:

引用 7 楼 sunscx102 的回复:

引用 6 楼 liangws 的回复:

这估计和布局有关系了。。楼主试试根据标准来写table吧。加上<tbody></tbody>这些

加上了,还是不行,这个table是美工画的,页面基本找不到几个DIV,全是table。。。


如果其他浏览器没问题,那肯定是布局问题了。。好好找……
[/Quote]

我把放到myeclipse里,报错了,多了个</a> 但是去掉了还是不行,哭了。。
sunscx102 2011-10-28
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 liangws 的回复:]

引用 7 楼 sunscx102 的回复:

引用 6 楼 liangws 的回复:

这估计和布局有关系了。。楼主试试根据标准来写table吧。加上<tbody></tbody>这些

加上了,还是不行,这个table是美工画的,页面基本找不到几个DIV,全是table。。。


如果其他浏览器没问题,那肯定是布局问题了。。好好找吧。。
有时候少了td或者多了其他啥的,IE……
[/Quote]
嗯,我仔细找找看
sunscx102 2011-10-28
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 liangws 的回复:]

不过我在IE6下面用你的布局试了下,倒是可以显示。。。
[/Quote]
嗯,ie6下能显示,但是没有效果了,这个到能理解,IE6岁数太大了,但是IE8就是不给面子。。
liangws 2011-10-28
  • 打赏
  • 举报
回复
不过我在IE6下面用你的布局试了下,倒是可以显示。。。
liangws 2011-10-28
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 sunscx102 的回复:]

引用 6 楼 liangws 的回复:

这估计和布局有关系了。。楼主试试根据标准来写table吧。加上<tbody></tbody>这些

加上了,还是不行,这个table是美工画的,页面基本找不到几个DIV,全是table。。。
[/Quote]

如果其他浏览器没问题,那肯定是布局问题了。。好好找吧。。
有时候少了td或者多了其他啥的,IE判断不出来
sunscx102 2011-10-28
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 liangws 的回复:]

这估计和布局有关系了。。楼主试试根据标准来写table吧。加上<tbody></tbody>这些
[/Quote]
加上了,还是不行,这个table是美工画的,页面基本找不到几个DIV,全是table。。。
liangws 2011-10-28
  • 打赏
  • 举报
回复
这估计和布局有关系了。。楼主试试根据标准来写table吧。加上<tbody></tbody>这些
sunscx102 2011-10-28
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 leehuat 的回复:]

CSS code

你最好查看你的open数据是否为0 1了
这个show不出来应该和ie8关系不大的
[/Quote]
open的值也对啊,可是就是死活出不来,愁死我了
leehuat 2011-10-28
  • 打赏
  • 举报
回复

你最好查看你的open数据是否为0 1了
这个show不出来应该和ie8关系不大的
sunscx102 2011-10-28
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 liangws 的回复:]

其他浏览器可以么?
[/Quote]
FF和CHROME都行
sunscx102 2011-10-28
  • 打赏
  • 举报
回复
FF和chrome都行
liangws 2011-10-28
  • 打赏
  • 举报
回复
其他浏览器可以么?

87,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧