Dealing with empty page attributes

Permalink
Hello,

I have a 5.6 site that has a blog with an image attribute associated. The problem is that on Internet Explorer it has a big empty box that shows up (see attachment) if there is no image applied to the attribute. I tried to check if the attribute is empty, and if so hide it with this:
<?php
$attr = $c->getAttribute('blog_image');
if (!empty($attr)): ?>
<script type="text/javascript">$('#blog-post img').hide()</script>
<?php endif; ?>
but it doesn't seem to work. Any ideas?

1 Attachment

Kurtopsy