[jQuery] Problems with show() / hide() in IE 7
I'm running into a problem showing and hiding elements in IE 7. I've
verified that my XHTML is valid. What I'm trying to do is have a div
that starts out with CSS display: none, then the user clicks an button
and I use jQuery show() to reveal the div and its contents. I've also
tried using slideDown(). They both work perfectly in Safari and
FireFox 2 and 3.
For some reason this doesn't work in IE 7. Click and nothing happens.
However, in the lower left corner of IE a warning shows saying "error
on page". Double click that and I get a dialog reiterating that there
was an error. Click "show details" and I get "line: 563, char: 700,
error: object doesn't support this property or method".
There is no char 700 on line 563. Here is line 563, which is in no way
addressed by my show/hide JS code:
<tr>
563 --> <td>
231 Plant Ln.
</td>
</tr>
Here is my JS code:
$('.reveal_contact_info').click(function(event) {
var listing_container = $
(event.target).parents('.listed_contact');
listing_container.find('.contact_info').show();
listing_container.find('.reveal_contact_info').hide();
listing_container.find('.hide_contact_info').show();
return false;
});
The initial CSS for the hidden element:
table.contact_info {
display:none;
margin:0.7em 0 2px 1.2em;
width:98%;
}
Anyone seen this before? Have any idea what's going on here?
Thanks!
Ethan