Explorar o código

Animate ajax loaded modules height

Denis K %!s(int64=9) %!d(string=hai) anos
pai
achega
970f2dac9d
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      jet/static/jet/js/main.js

+ 7 - 0
jet/static/jet/js/main.js

@@ -817,7 +817,14 @@
                             return;
                         }
 
+                        var oldHeight = $content.height();
                         $content.html(result.html);
+                        var newHeight = $content.height();
+
+                        $content.height(oldHeight);
+                        $content.animate({
+                            height: newHeight
+                        }, 250);
                     },
                     error: function() {
                         $content.empty();