]> git.mxchange.org Git - friendica.git/commitdiff
Fix sticky aside when height change
authorfabrixxm <fabrix.xm@gmail.com>
Wed, 26 Apr 2017 06:56:47 +0000 (08:56 +0200)
committerfabrixxm <fabrix.xm@gmail.com>
Wed, 26 Apr 2017 06:56:47 +0000 (08:56 +0200)
view/theme/frio/js/theme.js

index d567333b23503ebeaaec61c255175a7c7eb37121..7412df9b8ea8cce9e089d341912db11619d8dfb0 100644 (file)
@@ -320,7 +320,13 @@ $(document).ready(function(){
         * Sticky aside on page scroll
         */
        $("aside").stick_in_parent({
-               offset_top: 100 // px, header + tab bar + spacing
+               offset_top: 100, // px, header + tab bar + spacing
+               recalc_every: 10
+       });
+       // recalculate sticky aside on clicks.
+       // this handle height changes on expanding submenus
+       $("aside").on("click", function(){
+               $(document.body).trigger("sticky_kit:recalc");
        });
 });