alexanderdickson/waitForImages — Issue #6: Not working right in Safari 5.1.1
Author: lucassp
Created: 2011-10-25 10:55:17+00:00
State: open

Hi,

I'm trying to center some images in a div when after the page loads. On document ready I'm running the following code:

$('.photos-container .photos .photo img').waitForImages(function() {
var $this = $(this);
if ($this.height() < 80) {
$this.css('top', (80 - $this.height())/2);
}
});

It works fine the first time you open the page. But the second time I open the page it doesn't work anymore. Do you have a suggestion on how to get it right? Thank you!

Lucian