显示/隐藏div在IE中没有完全正常工作 [英] show/hide div not fully working in IE

查看:103
本文介绍了显示/隐藏div在IE中没有完全正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在联系我们页面。用户点击div,然后显示另一个更大的div,显示更多信息,提供框扩展或下降的效果。


我的页面上有3个起始div,每个扩大onclick。 show / hide elemant工作得很好。有一个小问题...我希望用户能够点击起始div内的任何地方,以便显示隐藏的div。这对于第一组div是可以的,但是您只能单击第二个和第三个div组的文本或边框。我不能为我的生活弄清楚为什么第二和第三个div不允许在div内的任何地方进行onclick。 HTML和CSS对于所有3都是相同的,所以我猜它一定是JS问题。

整个东西在Firefox中工作正常而不是IE!


这是一个在线示例:
http: //testsite.fisher.co.uk/2008_Re..._us_TEST2.html


这是我的HTML:


[HTML]< div id =" contact_us_conatiner">


< div id =" gallery">


<! - TAB 1 - >

< div class =" off" title =" tab1">< p> UK Orders< / p>< / div>

< div id =" tab1" class =" hide">

< p>问题1< / p>

< / div>


<! - TAB 2 - >

< div class =" off" title =" tab2">< p>产品技术支持< / p>< / div>

< div id =" tab2" class =" hide">

< p>问题2< / p>

< / div>


<! - TAB 3 - >

< div class =" off" title =" tab3">< p>区域销售专家< / p>< / div>

< div id =" tab3" class =" hide">

< p> content 3< / p>

< / div>


< / div><! - END - gallery div - >

< / div><! - END - contact_us_conatiner - >

[/ HTML]

CSS:

Hi,
Im making a ''contact us'' page. The user click on the div, this then reveals another larger div displaying more information giving the effect of the box expanding or dropping down.

I have 3 starting divs on my page, each one expanding onclick. The show/hide elemant works fine. There is one slight problem... I want the user to be able to click anywhere inside the starting div in order for the hidden div to be revealed. This is ok for the first set of divs, but you can only click on the text or border for the second and third div sets. I can''t figure out for the life of me why the second and third divs aren''t allowing the onclick anywhere inside the div. The HTML and CSS are identical for all 3 so i guess it must be a JS issue.
The whole thing works fine in Firefox just not IE!

Here''s an online example:
http://testsite.fisher.co.uk/2008_Re..._us_TEST2.html

Here''s my HTML:

[HTML]<div id="contact_us_conatiner">

<div id="gallery">

<!-- TAB 1 -->
<div class="off" title="tab1"><p>UK Orders</p></div>
<div id="tab1" class="hide">
<p>Question 1</p>
</div>

<!-- TAB 2 -->
<div class="off" title="tab2"><p>Product Technical Support</p></div>
<div id="tab2" class="hide">
<p>Question 2</p>
</div>

<!-- TAB 3 -->
<div class="off" title="tab3"><p>Regional Sales Specialists</p></div>
<div id="tab3" class="hide">
<p>content 3</p>
</div>

</div><!-- END - gallery div -->
</div><!-- END - contact_us_conatiner -->
[/HTML]
CSS:

展开 | 选择 | Wrap | 行号

推荐答案

工作在IE,Fx,Opera和Safari中很好......


根据你没有发生什么?
Working fine in IE, Fx, Opera and Safari...

What''s not happening according to you?

在IE中你需要的

单击第二个和第三个栏内的文本(产品t技术支持和区域销售专家)

我希望用户能够点击栏内的任何位置,例如顶栏。
in IE you have to click on the text inside the second and third bars (product technical support and Regional sales specialists)
I want the user to be able to click anywhere inside the bars, like with the top bar.


那是'我的IE发生了什么。我点击任一条(不是文本),它打开div。完全像Fx,Op和Sf中发生的事情。


我正在使用IE6。
That''s what is happening with my IE. I click on either of the bars (not text), it opens the div. Exactly like what happens in Fx, Op and Sf.

I''m using IE6.


这篇关于显示/隐藏div在IE中没有完全正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆