views:

22

answers:

1

I have a hidden div which I reveal with the jquery fadein() method:

$("#panel").fadeIn("slow");

and here's the html:

<div id="panel" style="display:none;">
  <hr/>
  <p>text</p>
  <button onclick="cancel()">cancel</button>
</div>

The text and the button within the panel is shown properly when the method is called but the hr stays hidden. Its display property is none according to firebug.

Why the HR is not shown together with the other elements? It's jquery 1.3.2

+4  A: 

I copied your markup and jQuery, and it fades in fine for me. However, if I add the following CSS rule, it does not fade in correctly...

hr { display: none; }

So you must have this rule somewhere. Remove it and your fade will work as expected.

Josh Stodola
A good way to check this is with Firebug in FF. Bring up the page, click Inspect Element (upper left of FB) and then click on the problem child. It will tell you what its *current* styles are and what line of what file they come from. Invaluable.
Peter Rowell
Thank you both. There was a leftover rule somewhere and that caused it. Firebug showed where it was applied.
tom