Просмотр исходного кода

Merge branch 'master' of https://github.com/unaio/una

roman.lesnikov@gmail.com 3 лет назад
Родитель
Сommit
30f72b0de0
1 измененных файлов с 11 добавлено и 7 удалено
  1. 11 7
      modules/boonex/lucid/js/menu_site.js

+ 11 - 7
modules/boonex/lucid/js/menu_site.js

@@ -20,12 +20,16 @@ BxLucidMenuMoreAuto.prototype.init = function(bForceInit)
     BxDolMenuMoreAuto.prototype.init.call(this);
 
     var $this = this;
+    var oImages = $('#bx-toolbar').find('img');
 
-    $(document).ready(function() {
-        $this.update();
-    });
-
-    $('#bx-toolbar').find('img').bind('load', function() {
-        $this.update();
-    });
+    if(!oImages.length)
+        $(document).ready(function() {
+            $this.update(true);
+        });
+    else
+        oImages.bind('load', function() {
+            setTimeout(function() {
+                $this.update(true);
+            }, 100);
+        });
 };