Check image cache when generating a toggleButton

This commit is contained in:
Rouslan Placella 2012-12-18 17:30:03 +00:00
parent 3935bd6448
commit 82243d5208

View File

@ -3022,8 +3022,14 @@ AJAX.registerTeardown('functions.js', function() {
AJAX.registerOnload('functions.js', function () {
$('div.toggleAjax').each(function () {
var $button = $(this).show();
$button.find('img').load(function () {
toggleButton($button);
$button.find('img').each(function() {
if (this.complete) {
toggleButton($button);
} else {
$(this).load(function () {
toggleButton($button);
});
}
});
});
});